News for hackers. Stuff that matters.
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.