0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-23 22:27:38 -05:00
caddy/middleware
Matthew Holt 2a46f2a14e Revert recent Content-Length-related changes and fix fastcgi return
fastcgi's ServeHTTP method originally returned the correct value (0) in
b51e8bc191. Later, I mistakenly suggested
we change that to return the status code because I forgot that status
codes aren't logged by the return value. So fastcgi broke due in
3966936bd6 due to my error.

We later had to try to make up for this with ugly Content-Length checks
like in c37ad7f677. Turns out that all we
had to do was fix the returned status here back to 0. The proxy
middleware behaves the same way, and returning 0 is correct. We should
only return a status code if the response has not been written, but with
upstream servers, we do write a response; they do not know about our
error handler.

Also clarifed this in the middleware.Handler documentation.
2016-03-02 11:33:40 -07:00
..
basicauth basicauth: fixed 'go vet' printing function value 2016-02-01 11:17:16 +01:00
browse browse: Fix for files and dirs with ':' in name 2016-01-13 13:17:58 -07:00
errors Revert recent Content-Length-related changes and fix fastcgi return 2016-03-02 11:33:40 -07:00
extensions ext: Fix panic when URL path is empty 2015-11-10 16:04:02 -07:00
fastcgi Revert recent Content-Length-related changes and fix fastcgi return 2016-03-02 11:33:40 -07:00
gzip gzip: Implement http.Hijacker (fixes #635) 2016-02-24 12:23:50 -07:00
headers headers: Initial test for Headers 2015-05-09 21:47:02 +02:00
inner rename middleware's name from internal to inner 2015-06-10 15:48:41 +08:00
log Revert recent Content-Length-related changes and fix fastcgi return 2016-03-02 11:33:40 -07:00
markdown Implement .DocFlags directive and tests. It holds all the boolean-typed front matter values. 2016-02-22 13:53:47 +03:00
mime New core middleware, MIME. 2015-09-30 18:37:10 +01:00
proxy gofmt -s; fix misspellings and lint; Go 1.5.3 in Travis CI 2016-02-14 00:10:57 -07:00
redirect Commenting on the need for additional redirect tests 2015-10-01 09:58:07 -07:00
rewrite rewrite: Fix a lint suggestion 2016-01-06 22:23:18 -07:00
templates Add argument in new optional block in templates midd to set delimiters 2015-10-29 20:33:01 -02:00
websocket Fix go vet 2015-11-15 11:06:50 -07:00
commands.go Two quotes next to each other result in one escaped quote; Add Split Example, add/refactor tests for every platform. 2015-10-24 15:33:04 +03:00
commands_test.go Two quotes next to each other result in one escaped quote; Add Split Example, add/refactor tests for every platform. 2015-10-24 15:33:04 +03:00
context.go templates: .Truncate can truncate from end of string if length is negative 2016-02-24 20:32:26 -07:00
context_test.go templates: .Truncate can truncate from end of string if length is negative 2016-02-24 20:32:26 -07:00
fileserver.go Check and return the correct error if Stat method fails (see golang issue #12991) 2015-10-21 01:25:38 +03:00
fileserver_test.go gofmt -s; fix misspellings and lint; Go 1.5.3 in Travis CI 2016-02-14 00:10:57 -07:00
middleware.go Revert recent Content-Length-related changes and fix fastcgi return 2016-03-02 11:33:40 -07:00
middleware_test.go Move common function into existing file 2015-10-29 10:34:47 -06:00
path.go Fix more lint warnings 2015-05-24 22:52:34 -04:00
recorder.go gzip: Implement http.Hijacker (fixes #635) 2016-02-24 12:23:50 -07:00
recorder_test.go Fix formatting directives in tests 2015-09-04 08:34:58 -07:00
replacer.go Recorder: Exporting ResponseRecorder #614 2016-02-20 23:10:04 +01:00
replacer_test.go Fix for case-insensitive header replacements (#476) 2015-12-31 12:31:30 -07:00
roller.go Address various lint and gocyclo warnings. Fixes #253 2015-10-11 16:28:02 -04:00