Show HN: Statuscoder, easily get any HTTP status code for testing (statuscoder.com)

54 points by ajack ↗ HN
I recently wanted to test how a part of a web app responded to a 502 HTTP status code from a remote site from which it was pulling data. When I came to test it, the remote site was working fine, but I still wanted the 502. So I created statuscoder, just append your desired status code to the URL and it'll respond with that code.

http://statuscoder.com

It's my first single-use project and I like its simplicity - it does one job and (hopefully) does it well. Is there anything else that you'd want to see it do?

13 comments

[ 2.6 ms ] story [ 36.8 ms ] thread
Bad SSL configuration on this server. Looks like it's missing an intermediate certificate.

Instructions for the site owner are here: http://www.alphassl.com/support/install-root-certificate.htm...

I'm not adding an exception to view it, and non-SSL redirects to SSL.

Works fine in Chrome on my Mac.
Oops, didn't pick up on this - it works fine on my machine (without adding exception). I've removed the non-ssl redirect while I get it sorted. Thanks for the heads up :)
Intermediate certificates are easy to mess up, and they don't always show up for everyone as a problem.

Just thought I'd help out!

Test with `curl' is where I noticed it broken -- seems to work in Chrome, possibly because they cache intermediate certificates or something?

~% curl 'https://statuscoder.com/ curl: (60) SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

SSL fixed now, thanks :D
https://statuscoder.com/418

Thanks you made me smile. :) Can I ask you what your motivation for this project is?

A part of our core app at work pulls in data from a remote source and the other day the remote server was giving a 502. When I came to test it, everything was fine again but I fixed the problem and wanted to see how it reacted again to a 502. I thought it'd be nice to have something where I could specify a status code and get that code back.
This is a great idea ... Thanks for sharing your test rig. Obviously this can't really be ad supported so maybe a network of us could donate bandwidth if it becomes an issue.
I'm not very familiar with X-Frame-Options and X-XSS-Protection headers. Do they actually do anything for errors or empty responses, or does this stack just add them by default?