Commit Graph

38 Commits

Author SHA1 Message Date
Abiola Ibrahim
e7001e6538 Add except to FastCGI. Minor refactor in proxy. 2016-03-20 08:02:17 +01:00
Abiola Ibrahim
9f9fbf2e1b Support for case insensitive paths using CASE_SENSITIVE_PATH environment variable. 2016-03-19 08:45:23 +01:00
Matthew Holt
741d7685f1 Merge branch 'master' into fastcgi-methods
# Conflicts:
#	middleware/fastcgi/fastcgi.go
2016-03-07 16:25:23 -07:00
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
Matthew Holt
c37ad7f677 Only write error message/page if body not already written (fixes #567)
Based on work started in, and replaces, #614
2016-02-24 19:50:46 -07:00
Matthew Holt
737c7c4372 fastcgi: Only perform extra copy if necessary; added tests 2016-02-24 16:42:01 -07:00
Benoit Benedetti
ef5f9c771d FastCGI: Explicitly set Content-Length #626 2016-02-24 22:11:07 +01:00
Matthew Holt
cae9f7de9c gofmt -s; fix misspellings and lint; Go 1.5.3 in Travis CI 2016-02-14 00:10:57 -07:00
Matthew Holt
600ee9a89f fastcgi: Accept any other methods as a POST-style request 2016-01-31 21:36:39 -07:00
MathiasB
d8be787f39 FastCGI: IPv6 when parsing r.RemoteAddr 2016-01-28 15:26:33 +01:00
Kevin Bowrin
4d4ea94465 Parse address from fastcgi directive, and pass results to fcgiclient Dial().
This allows scheme prefixes "tcp://" and "fastcgi://" in configuration.

Fixes #540
2016-01-28 00:19:00 -05:00
Abiola Ibrahim
3966936bd6 Remove trailing new line for cleaner log output.
Return correct status code.
2015-12-13 12:58:21 +01:00
Abiola Ibrahim
b7fd1f4e9e FastCGI: separate standard and error output responses. 2015-12-12 14:04:48 +01:00
buddhamagnet
57f1d3c205 pass golint
pass all tests

respond to maintainer comments

reinstate assignment of t

correct typo

correct typo

pass linter some more
2015-11-05 00:40:35 +00:00
Abiola Ibrahim
dd1c49bde9 Fix for issues #297 and #298 2015-10-31 02:24:37 +01:00
Zac Bergquist
f9bc74626d Address various lint and gocyclo warnings. Fixes #253 2015-10-11 16:28:02 -04:00
Mathias Beke
bb85a84561 Merge remote-tracking branch 'upstream/master'
Conflicts:
	middleware/fastcgi/fastcgi.go
2015-09-28 22:11:05 +02:00
Matthew Holt
be6fc35326 fastcgi: Fix REQUEST_URI if rewrite directive changes URL 2015-09-27 18:48:28 -06:00
Mathias Beke
aa5a595762 middleware/fastcgi: Stripping PATH_INFO from SCRIPT_NAME 2015-09-16 20:25:40 +02:00
Matthew Holt
8d81ae88da fastcgi: Add HTTPS env variable on HTTPS connections 2015-08-03 17:16:24 -06:00
Abiola Ibrahim
4240817a3a Fix for Issue 141: index not found, 502 Bad Gateway. 2015-06-30 11:54:50 +01:00
Abiola Ibrahim
820b2af43a FastCGI: allow "unix:" prefix for unix sockets. 2015-06-04 23:03:58 +01:00
Abiola Ibrahim
4e94b85ec2 FastCGI: support for unix sockets. 2015-05-23 03:39:23 +01:00
Matthew Holt
7c844909b9 fastcgi: Add support for OPTIONS requests 2015-05-06 11:14:02 -06:00
Matthew Holt
47717fee88 Expanded index file support to other middlewares (fixes #27) 2015-05-05 15:50:42 -06:00
Matthew Holt
6029973bdc Major refactoring of middleware and parser in progress 2015-05-04 11:04:37 -06:00
Abiola Ibrahim
225d5977ff fastcgi: allow more request types. 2015-05-03 12:12:18 +01:00
Abiola Ibrahim
447d0ce0e2 fastcgi: user defined environment variables 2015-05-01 19:55:47 +01:00
Matthew Holt
b51e8bc191 fastcgi: Fix for handling errors that come from responder 2015-04-30 07:50:07 -06:00
Thomas Hansen
17fa5a9334 adding support for fastcgi index files in subdirectories 2015-04-28 13:15:14 -06:00
Thomas Hansen
1b17072a89 gzip middleware now strips encoding header 2015-04-26 22:01:20 -06:00
Thomas Hansen
1ac32a5256 generalizing fastcgi parameters, and improving headers passed. 2015-04-25 21:56:14 -06:00
Thomas Hansen
96985fb3fd adding support for php including clean urls and wordpress permalinks 2015-04-20 17:40:54 -06:00
Matthew Holt
113b175db7 Refactored fastcgi middleware 2015-04-11 17:15:17 -06:00
Matthew Holt
d33256f1dc Refactor: Middleware chain uses Handler instead of HandlerFunc 2015-04-02 23:30:54 -06:00
Matthew Holt
22707edcbf Refactored fastcgi middleware to return errors 2015-03-28 16:52:43 -06:00
Matthew Holt
bcdf04d00e Inlined a fixed version of the fastcgi_client dependency 2015-01-29 23:48:35 -07:00
Matthew Holt
affd470820 Moved fastcgi middleware into its own package 2015-01-29 22:03:14 -07:00