Created
September 10, 2010 16:23
-
-
Save rsutphin/573924 to your computer and use it in GitHub Desktop.
Example for thin issue #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
run proc { |env| | |
[ | |
200, | |
{ "Content-Type" => "text/plain", "X-Foo" => "Bar\nBaz" }, | |
["Foo?\n"] | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Server on 9292 started with `rackup -s thin multiple.ru` | |
# Thin only returns the first value for X-Foo | |
$ curl -v http://127.0.0.1:9292/ | |
* About to connect() to 127.0.0.1 port 9292 (#0) | |
* Trying 127.0.0.1... connected | |
* Connected to 127.0.0.1 (127.0.0.1) port 9292 (#0) | |
> GET / HTTP/1.1 | |
> User-Agent: curl/7.20.0 (i386-apple-darwin10.3.0) libcurl/7.20.0 OpenSSL/0.9.8n zlib/1.2.5 libidn/1.18 | |
> Host: 127.0.0.1:9292 | |
> Accept: */* | |
> | |
< HTTP/1.1 200 OK | |
< Transfer-Encoding: chunked | |
< Content-Type: text/plain | |
< X-Foo: Bar | |
< Connection: close | |
< Server: thin 1.2.7 codename No Hup | |
< | |
Foo? | |
* Closing connection #0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Server on 8080 started with `unicorn multiple.ru` | |
# Unicorn correctly returns all X-Foo headers | |
$ curl -v http://127.0.0.1:8080/ | |
* About to connect() to 127.0.0.1 port 8080 (#0) | |
* Trying 127.0.0.1... connected | |
* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0) | |
> GET / HTTP/1.1 | |
> User-Agent: curl/7.20.0 (i386-apple-darwin10.3.0) libcurl/7.20.0 OpenSSL/0.9.8n zlib/1.2.5 libidn/1.18 | |
> Host: 127.0.0.1:8080 | |
> Accept: */* | |
> | |
< HTTP/1.1 200 OK | |
< Date: Fri, 10 Sep 2010 16:23:17 GMT | |
< Status: 200 OK | |
< Connection: close | |
< Content-Type: text/plain | |
< X-Foo: Bar | |
< X-Foo: Baz | |
< | |
Foo? | |
* Closing connection #0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment