Browser HTTP Response Handling Test Results


Revisions

05/04/2011 - Initial test results

07/12/2011 - Default status results added

15/12/2011 - Fixed results on redirection codes with location header and content arising from bug in test harness

Please send any feedback or additional tests to: cam@cmhjones.com


Summary

Tests performed to examine how browsers handle HTTP response codes with variation on response location header and included\omitted content payload.


Method

Tests performed using form POST to request test response

Tests performed with and without response body content

Tests performed with and without Location header

Firefox, Opera, Safari & Chrome tested on OSX 10.6

IE tested on Windows 7 64-bit

Default response handling determined through tests on multiple unknown status codes


Key

Render
Response body rendered in browser window
Redirect
The browser redirects the request to the URI in the Location header response
Rewrite
The response status is rewritten and processed by the browser
Abort
The browser aborts the request staying on the same page
Confirm
A confirmation dialog box is displayed to the user
No content displayed in browser window
Timeout
Request terminated by browser after time limit
Error
Browser error page displayed with native message

Content Responses

Sample Response

		HTTP/1.1 200 OK
		Location        http://www.example.com
		Content-Type    text/html
		Content-Length  194
		Server          Jetty(6.1.7)
				
		<html>
		    <body>
		        <h1>Response</h1>
		        <p>Response Status: 200</p>
		        <p>Response Reason: OK</p>
		    </body>
		</html>
	
Status Message Firefox 8.0.1 Opera 11.5 Safari 5.0.3 Chrome 15.0 IE 9.0
1xx Informational
1xx Default Timeout - 200 OK Timeout - Error Timeout - Error Timeout - 200 OK Timeout - Error
2xx Success
2xx Default Render Render Render Render Render
204 No Content Rewrite: 200 Rewrite: 200 Rewrite: 200 Rewrite: 200 Rewrite: 200
205 Reset Content No Content Render Render Abort Render
3xx Redirection
3xx Default Render Render Redirect Render Render
300 Multiple Choices Redirect Redirect Render Render Redirect
301 Moved Permenantly Redirect Redirect Redirect Redirect Redirect
302 Found Redirect Redirect Redirect Redirect Redirect
303 See Other Redirect Redirect Redirect Redirect Redirect
304 Not Modified No Content Confirm: Open\Save Timeout: No Content No Content Timeout
305 Use Proxy Render Render Redirect Render Render
306 Switch Proxy Render Render Redirect Render Render
307 Temporary Redirect Redirect Redirect Redirect Redirect Redirect
4xx Client Error
4xx Default Render Render Render Render Render
400 Bad Request Render Render Render Render content < 512 bytes ? Error : Render
403 Forbidden Render Render Render Render content < 512 bytes ? Error : Render
404 Not Found Render Render Render Render content < 512 bytes ? Error : Render
405 Method Not Allowed Render Render Render Render content < 512 bytes ? Error : Render
406 Not Acceptable Render Render Render Render content < 512 bytes ? Error : Render
407 Proxy Authentication Required Render Render Render Error Render
408 Request Timeout Error Render Render Render content < 512 bytes ? Error : Render
409 Conflict Render Render Render Render content < 512 bytes ? Error : Render
410 Gone Render Render Render Render content < 512 bytes ? Error : Render
5xx Server Error
5xx Default Render Render Render Render Render
500 Internal Server Error Render Render Render Render content < 512 bytes ? Error : Render
501 Not Implemented Render Render Render Render content < 512 bytes ? Error : Render
505 HTTP Version Not Supported Render Render Render Render content < 512 bytes ? Error : Render

Empty Responses

Sample Response

		HTTP/1.1 200 OK
		Location        http://www.example.com
		Content-Length  0
		Server          Jetty(6.1.7)		
	
Status Message Firefox 8.0.1 Opera 11.5 Safari 5.0.3 Chrome 15.0 IE 9.0
1xx Informational
1xx Default Timeout - 200 OK Timeout - Error Timeout - Error Timeout - 200 OK Timeout - Error
2xx Success
2xx Default No Content No Content No Content No Content No Content
204 No Content No Content No Content No Content No Content Abort
205 Reset Content No Content No Content No Content Abort No Content
3xx Redirection
3xx Default No Content No Content Redirect No Content No Content
300 Multiple Choices Redirect Redirect No Content No Content Redirect
301 Moved Permenantly Redirect Redirect Redirect Redirect Redirect
302 Found Redirect Redirect Redirect Redirect Redirect
303 See Other Redirect Redirect Redirect Redirect Redirect
304 Not Modified No Content Confirm: Open\Save No Content Error: ERR_FILE_NOT_FOUND No Content
305 Use Proxy No Content No Content Redirect No Content No Content
306 Switch Proxy No Content No Content Redirect No Content No Content
307 Temporary Redirect Redirect Redirect Redirect Redirect Redirect
4xx Client Error
4xx Default No Content No Content No Content No Content No Content
400 Bad Request No Content No Content No Content No Content Error
403 Forbidden No Content No Content No Content No Content Error
404 Not Found No Content No Content No Content No Content Error
405 Method Not Allowed No Content No Content No Content No Content Error
406 Not Acceptable No Content No Content No Content No Content Error
407 Proxy Authentication Required No Content No Content No Content Error No Content
408 Request Timeout Error No Content No Content No Content Error
409 Conflict No Content No Content No Content No Content Error
410 Gone No Content No Content No Content No Content Error
5xx Server Error
5xx Default No Content No Content No Content No Content No Content
500 Internal Server Error No Content No Content No Content No Content Error
501 Not Implemented No Content No Content No Content No Content Error
505 HTTP Version Not Supported No Content No Content No Content No Content Error