

Show HN: Statuscoder, easily get any HTTP status code for testing - ajack
https://statuscoder.com
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.<p>http://statuscoder.com<p>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?
======
nigma
Also <http://httpbin.org/>. It can handle more test cases and the source code
is on github.

------
mcpherrinm
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...](http://www.alphassl.com/support/install-root-
certificate.html)

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

~~~
ajack
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 :)

~~~
mcpherrinm
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

------
Herald_MJ
<http://httpstat.us> does this too.

------
prodigal_erik
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?

------
Alan01252
<https://statuscoder.com/418>

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

~~~
ajack
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.

~~~
smoyer
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.

------
nja
This is pretty cool! I'm just disappointed that 420 doesn't say Enhance Your
Calm, but then again, you're not Twitter <https://dev.twitter.com/docs/error-
codes-responses>

