The "HTTP response with specific status code" app

Published September 29, 2008

I've recently found the need to test how my applications behave against HTTP responses with different status codes, and created a small app on Google App Engine which returns a HTTP response with a specific status code:

httpstatus.appspot.com

It's interesting to see how different browsers handle responses with various status codes. For example, Safari 3.1.2 returns a "kCFErrorDomainCFNetwork" error for status code 100 and Firefox 3.0.1 offers me to download a "Untyped Binary Data" file.

Comments

Jeff McNeil on September 30, 2008
That's pretty handy, actually. Might also be worth adding a 'Location' header to the redirect codes so that it's possible to see how applications handle that.

Reply

Arthur on October 3, 2008
Good idea, I added a 'Location' header for 300, 301, 302, 303 and 307.

Reply

Tom on October 1, 2008
Thanks a lot! I was actually planning to do this myself soon since I do a lot of network programming. As previously mentioned, it would be even more helpful if more headers were included and possibly some common use-cases such as multiple redirects. Bookmarked!

Reply

Arthur on October 3, 2008
The multiple redirect use-case is a great idea - I added it to the app, take a look at the app description to see how to test it. As for more headers, I'm trying to find out which headers specific codes need and will be slowly adding them to the app. Feel free to point me in the right direction if I'm missing something.

Reply

Oscar on October 1, 2008
The list could have consisted of links, so you didn't have to write the code.

Reply

Kevin Gann on October 1, 2008
If you implement a servlet and run it on something light like Tomcat you could just have the servlet return the codes. http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/Servlet-Tutorial-Response-Status-Line.html

Reply

Reply