summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/fileserver
AgeCommit message (Collapse)Author
2019-08-09Fix module-related errorsMatthew Holt
2019-08-09Implement config adapters and beginning of Caddyfile adapterMatthew Holt
Along with several other changes, such as renaming caddyhttp.ServerRoute to caddyhttp.Route, exporting some types that were not exported before, and tweaking the caddytls TLS values to be more consistent. Notably, we also now disable automatic cert management for names which already have a cert (manually) loaded into the cache. These names no longer need to be specified in the "skip_certificates" field of the automatic HTTPS config, because they will be skipped automatically.
2019-08-07Part 1: Optimize using compiler's inliner (#2687)Dominik Braun
* optimized functions for inlining * added note regarding ResponseWriterWrapper * optimzed browseWrite* methods for FileServer * created benchmarks for comparison * creating browseListing instance in each function * created benchmarks for openResponseWriter * removed benchmarks of old implementations * implemented sync.Pool for byte buffers * using global sync.Pool for writing JSON/HTML
2019-07-15Minor tweaksMatthew Holt
2019-07-12Get module name at runtime, and tidy up modulesMatthew Holt
2019-07-11Add error & subroute handlers; weakString; other minor handler changesMatthew Holt
2019-07-09Flatten HTTP handler config (#2662)Matthew Holt
Differentiating middleware and responders has one benefit, namely that it's clear which module provides the response, but even then it's not a great advantage. Linear handler config makes a little more sense, giving greater flexibility and simplifying the core a bit, even though it's slightly awkward that handlers which are responders may not use the 'next' handler that is passed in at all.
2019-07-07Fix error handling with Validate when loading modules (fixes #2658)Matthew Holt
The return statement was improperly nested in context.go
2019-07-02go.mod: Append /v2 to module name; update all import pathsMatthew Holt
See https://github.com/golang/go/wiki/Modules#semantic-import-versioning
2019-06-30Add licenseMatthew Holt
2019-06-27Implement etag; fix related bugs in encode and templates middlewaresMatthew Holt
2019-06-21Various bug fixes and minor improvementsMatthew Holt
- Fix static responder so it doesn't replace its own headers config, and instead replaces the actual response header values - caddyhttp.ResponseRecorder type optionally buffers response - Add interface guards to ensure regexp matchers get provisioned - Use default HTTP port if one is not explicitly set - Encode middleware writes status code 200 if not written upstream - Templates and markdown only try to execute on text responses - Static file server sets Content-Type based on file extension only (this whole thing -- MIME sniffing, etc -- needs more configurability)
2019-06-14Rename caddy2 -> caddyMatthew Holt
Removes the version from the package name
2019-06-07Do not allow Go standard lib to sniff Content-Type headerMatthew Holt
2019-06-04Change import paths to GitHub package namesMatthew Holt
2019-05-22Export types and fields necessary to build configs (for config adapters)Matthew Holt
Also flag most fields with 'omitempty' for JSON marshaling
2019-05-21Module.New() does not need to return an errorMatthew Holt
2019-05-21Take care of remaining TODOs in the browse responderMatthew Holt
2019-05-20Implement rewrite middleware; fix middleware stack bugsMatthew Holt
2019-05-20Default error handler; rename StaticFiles -> FileServerMatthew Holt