Created
September 10, 2010 14:35
-
-
Save rsutphin/573737 to your computer and use it in GitHub Desktop.
Example for rack/rack issue 52
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 running with `rackup -s mongrel multiple.ru` | |
$ 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 | |
< Connection: close | |
< Date: Fri, 10 Sep 2010 14:33:41 GMT | |
< WWW-Authenticate: Bar realm=X | |
< WWW-Authenticate: Baz realm=Y | |
< Transfer-Encoding: chunked | |
< Content-Type: text/plain | |
< | |
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
run proc { |env| | |
[ | |
200, | |
{ "Content-Type" => "text/plain", "WWW-Authenticate" => "Bar realm=X\nBaz realm=Y" }, | |
["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 running with `rackup -s webrick multiple.ru` | |
$ 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 | |
< Connection: Keep-Alive | |
< Content-Type: text/plain | |
< WWW-Authenticate: Baz realm=Y | |
< Date: Fri, 10 Sep 2010 14:32:03 GMT | |
< Server: WEBrick/1.3.1 (Ruby/1.8.7/2010-04-19) | |
< Content-Length: 5 | |
< | |
Foo? | |
* Connection #0 to host 127.0.0.1 left intact | |
* Closing connection #0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment