Re:Httpstat.us: API for generating different HTTP codes.
by kilian on Tuesday February 15, 2011 @06:43AM
(#2220882)
I like how it implements "418 I'm a teapot" as well :)
[ Parent
| on HN ]
Re:Httpstat.us: API for generating different HTTP codes.
by ErrantX on Tuesday February 15, 2011 @08:35AM
(#2221089)
From the click through (http://www.ietf.org/rfc/rfc2324.txt):
2.1.4 WHEN method When coffee is poured, and milk is offered, it is necessary for the holder of the recipient of milk to say "when" at the time when sufficient milk has been introduced into the coffee. For this purpose, the "WHEN" method has been added to HTCPCP. Enough? Say WHEN.
Re:Httpstat.us: API for generating different HTTP codes.
by JonnieCache on Tuesday February 15, 2011 @11:49AM
(#2221956)
Except it doesn't actually, it returns 'Unknown Error.' Disappointed. Maybe varnish isn't allowing it through?
$ curl -v http://httpstat.us/418
* About to connect() to httpstat.us port 80 (#0)
* Trying 75.101.145.87... connected
* Connected to httpstat.us (75.101.145.87) port 80 (#0)
> GET /418 HTTP/1.1
> User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8l zlib/1.2.3
> Host: httpstat.us
> Accept: */*
>
< HTTP/1.1 418 Unknown Error
< Server: nginx/0.7.67
< Date: Tue, 15 Feb 2011 16:46:59 GMT
< Content-Type: text/plain
< Connection: keep-alive
< Access-Control-Allow-Origin: *
< Content-Length: 16
< X-Varnish: 1137499688
< Age: 0
< Via: 1.1 varnish
<
* Connection #0 to host httpstat.us left intact
* Closing connection #0
418 I'm a Teapot
Re:Httpstat.us: API for generating different HTTP codes.
by tatham on Monday February 21, 2011 @11:39PM
(#2248767)
You're still getting a 418 response there, just not the right status description.
Varnish is certainly stuffing us up a bit. There's a note about this at the bottom of the page.
If I did this again, I wouldn't deploy it to Heroku for this reason.