Test Cases for HTTP Redirects

Please send feedback to julian.reschke@gmx.de.

Note: Work-in-progress

Colors -- Red: Failure, Green: Pass, Yellow: Warning, Grey: Not Supported

Score -- Passes: 2 points, Warning: 1 point, in percent of possible points (this should be updated to count optional features differently)

Test CaseFirefox 27Microsoft IE 11Safari 7Google Chrome 32Konqueror 4.11.2
Summary100% passes, 0% failures, 0% warnings, 0% unsupported, 0% to-do
Score: 100
88% passes, 12% failures, 0% warnings, 0% unsupported, 0% to-do
Score: 88
96% passes, 4% failures, 0% warnings, 0% unsupported, 0% to-do
Score: 96
94% passes, 6% failures, 0% warnings, 0% unsupported, 0% to-do
Score: 94
73% passes, 27% failures, 0% warnings, 0% unsupported, 0% to-do
Score: 73
300 (Multiple Choices)t300emptypass (displays empty page) pass (displays empty page) pass (displays empty page) pass (displays empty page) pass (displays empty page)
t300bodypass (displays response body) pass (displays response body) pass (displays response body) pass (displays response body) fail (does not display response body)
t300locpass (follows redirect) pass (follows redirect) pass (displays empty page) pass (displays empty page) pass (follows redirect)
t300bodyandlocpass (follows redirect) pass (follows redirect) pass (displays response body) pass (displays response body) pass (follows redirect)
301 (Moved Permanently)t301emptypass (displays empty page) pass (displays "Internet Explorer cannot display the webpage") pass (displays empty page) pass (displays empty page) pass (displays empty page)
t301bodypass (displays response body) fail (displays "Internet Explorer cannot display the webpage") pass (displays response body) pass (displays response body) fail (does not display response body)
t301locpass (follows redirect) pass (follows redirect) pass (follows redirect) pass (follows redirect) pass (follows redirect)
t301bodyandlocpass (follows redirect) pass (follows redirect) pass (follows redirect) pass (follows redirect) pass (follows redirect)
t301methodspasspasspasspassfail (HEAD apparently times out (also: POST not rewritten to GET!) (see KDE Bug 330795)
302 (Found)t302emptypass (displays empty page) pass (displays "Internet Explorer cannot display the webpage") pass (displays empty page) pass (displays empty page) pass (displays empty page)
t302bodypass (displays response body) fail (displays "Internet Explorer cannot display the webpage") pass (displays response body) pass (displays response body) fail (does not display response body)
t302locpass (follows redirect) pass (follows redirect) pass (follows redirect) pass (follows redirect) pass (follows redirect)
t302bodyandlocpass (follows redirect) pass (follows redirect) pass (follows redirect) pass (follows redirect) pass (follows redirect)
t302methodspasspasspasspassfail (HEAD apparently times out (also: POST not rewritten to GET!) (see KDE Bug 330795)
303 (See Other)t303emptypass (displays empty page) pass (displays "Internet Explorer cannot display the webpage") pass (displays empty page) pass (displays empty page) pass (displays empty page)
t303bodypass (displays response body) fail (displays "Internet Explorer cannot display the webpage") pass (displays response body) pass (displays response body) fail (does not display response body)
t303locpass (follows redirect) pass (follows redirect) pass (follows redirect) pass (follows redirect) pass (follows redirect)
t303bodyandlocpass (follows redirect) pass (follows redirect) pass (follows redirect) pass (follows redirect) pass (follows redirect)
t303methodspassfail (HEAD rewritten to GET) fail (HEAD rewritten to GET) passfail (HEAD apparently times out, all other methods preserved! (see KDE Bug 330795)
304 (Not Modified)t304emptypass (displays empty page) pass (displays empty page) pass (displays empty page) pass (displays "This webpage is not found") pass (displays empty page)
t304bodypass (displays empty page) pass (displays empty page) pass (displays empty page) pass (displays "This webpage is not found") pass (displays empty page)
t304locpass (displays empty page) pass (displays empty page) pass (displays empty page) pass (displays "This webpage is not found") pass (displays empty page)
t304bodyandlocpass (displays empty page) pass (displays empty page) pass (displays empty page) pass (displays "This webpage is not found") pass (displays empty page)
305 (Use Proxy)t305emptypass (displays empty page) pass (displays empty page) pass (displays empty page) pass (displays empty page) pass (displays empty page)
t305bodypass (displays response body) pass (displays response body) pass (displays response body) pass (displays response body) pass (displays response body)
t305locpass (displays empty page) pass (displays empty page) pass (displays empty page) pass (displays empty page) pass (follows redirect)
t305bodyandlocpass (displays response body) pass (displays response body) pass (displays response body) pass (displays response body) pass (follows redirect)
306t306emptypass (displays empty page) pass (displays empty page) pass (displays empty page) pass (displays empty page) pass (displays empty page)
t306bodypass (displays response body) pass (displays response body) pass (displays empty page) pass (displays response body) fail (does not display response body)
t306locpass (displays empty page) pass (displays empty page) pass (follows redirect) pass (displays empty page) pass (displays empty page)
t306bodyandlocpass (displays response body) pass (displays response body) pass (follows redirect) pass (displays response body) pass (displays response body)
307 (Temporary Redirect)t307emptypass (displays empty page) pass (displays "Internet Explorer cannot display the webpage") pass (displays empty page) pass (displays empty page) pass (displays empty page)
t307bodypass (displays response body) fail (displays "Internet Explorer cannot display the webpage") pass (displays response body) pass (displays response body) fail (does not display response body)
t307locpass (follows redirect) pass (follows redirect) pass (follows redirect) pass (follows redirect) pass (follows redirect)
t307bodyandlocpass (follows redirect) pass (follows redirect) pass (follows redirect) pass (follows redirect) pass (follows redirect)
t307methodspasspasspasspassfail (HEAD apparently times out (see KDE Bug 330795)
308 (Permanent Redirect)t308emptypass (displays empty page) pass (displays empty page) pass (displays empty page) pass (displays empty page) pass (displays empty page)
t308bodypass (displays response body) pass (displays response body) pass (displays response body) pass (displays response body) fail (does not display response body)
t308locpass (follows redirect) pass (displays empty page) pass (follows redirect) fail (displays empty page (see Chrome Issue 109012)) pass (follows redirect)
t308bodyandlocpass (follows redirect) pass (displays response body) pass (follows redirect) fail (displays response body (see Chrome Issue 109012)) pass (follows redirect)
t308methodspassfail (does not follow the redirect) passfail (does not follow the redirect (see Chrome Issue 109012)) fail (HEAD apparently times out (see KDE Bug 330795))
399t399emptypass (displays empty page) pass (displays empty page) pass (displays empty page) pass (displays empty page) pass (displays empty page)
t399bodypass (displays response body) pass (displays response body) pass (displays response body) pass (displays response body) fail (does not display response body)
t399locpass (displays empty page) pass (displays empty page) pass (follows redirect) pass (displays empty page) pass (follows redirect)
t399bodyandlocpass (displays response body) pass (displays response body) pass (follows redirect) pass (displays response body) pass (follows redirect)
Fragment Handlingtfnrypass (#A) pass (#A) pass (#A) pass (#A) pass (#A)
tfyrnpass (#B) pass (#B) fail (none!) pass (#B) pass (#B)
tfyrypass (#A) pass (#A) pass (#A) pass (#A) pass (#A)

Test Cases

300 (Multiple Choices)

Various tests checking status code 300.

t300empty [TEST] [R]

Test Results
FF27pass (displays empty page)
MSIE11pass (displays empty page)
Safaripass (displays empty page)
Chr32pass (displays empty page)
Konqpass (displays empty page)

Status code 300, no Location header field, no content

Result for this UA:

t300body [TEST] [R]

Test Results
FF27pass (displays response body)
MSIE11pass (displays response body)
Safaripass (displays response body)
Chr32pass (displays response body)
Konqfail (does not display response body)

Status code 300, no Location header field, with body

Result for this UA:

t300loc [TEST] [R]

Test Results
FF27pass (follows redirect)
MSIE11pass (follows redirect)
Safaripass (displays empty page)
Chr32pass (displays empty page)
Konqpass (follows redirect)

Status code 300, Location header field, no body

Result for this UA:

t300bodyandloc [TEST] [R]

Test Results
FF27pass (follows redirect)
MSIE11pass (follows redirect)
Safaripass (displays response body)
Chr32pass (displays response body)
Konqpass (follows redirect)

Status code 300, Location header field, with body

Result for this UA:

301 (Moved Permanently)

Various tests checking status code 301.

t301empty [TEST] [R]

Test Results
FF27pass (displays empty page)
MSIE11pass (displays "Internet Explorer cannot display the webpage")
Safaripass (displays empty page)
Chr32pass (displays empty page)
Konqpass (displays empty page)

Status code 301, no Location header field, no content

Result for this UA:

t301body [TEST] [R]

Test Results
FF27pass (displays response body)
MSIE11fail (displays "Internet Explorer cannot display the webpage")
Safaripass (displays response body)
Chr32pass (displays response body)
Konqfail (does not display response body)

Status code 301, no Location header field, with body

Result for this UA:

t301loc [TEST] [R]

Test Results
FF27pass (follows redirect)
MSIE11pass (follows redirect)
Safaripass (follows redirect)
Chr32pass (follows redirect)
Konqpass (follows redirect)

Status code 301, Location header field, no body

Result for this UA:

t301bodyandloc [TEST] [R]

Test Results
FF27pass (follows redirect)
MSIE11pass (follows redirect)
Safaripass (follows redirect)
Chr32pass (follows redirect)
Konqpass (follows redirect)

Status code 301, Location header field, with body

Result for this UA:

t301methods [TEST]

Test Results
FF27pass
MSIE11pass
Safaripass
Chr32pass
Konqfail (HEAD apparently times out (also: POST not rewritten to GET!) (see KDE Bug 330795)

method handling for 301 redirects

method should be preserved except for POST that may be rewritten to GET

302 (Found)

Various tests checking status code 302.

t302empty [TEST] [R]

Test Results
FF27pass (displays empty page)
MSIE11pass (displays "Internet Explorer cannot display the webpage")
Safaripass (displays empty page)
Chr32pass (displays empty page)
Konqpass (displays empty page)

Status code 302, no Location header field, no content

Result for this UA:

t302body [TEST] [R]

Test Results
FF27pass (displays response body)
MSIE11fail (displays "Internet Explorer cannot display the webpage")
Safaripass (displays response body)
Chr32pass (displays response body)
Konqfail (does not display response body)

Status code 302, no Location header field, with body

Result for this UA:

t302loc [TEST] [R]

Test Results
FF27pass (follows redirect)
MSIE11pass (follows redirect)
Safaripass (follows redirect)
Chr32pass (follows redirect)
Konqpass (follows redirect)

Status code 302, Location header field, no body

Result for this UA:

t302bodyandloc [TEST] [R]

Test Results
FF27pass (follows redirect)
MSIE11pass (follows redirect)
Safaripass (follows redirect)
Chr32pass (follows redirect)
Konqpass (follows redirect)

Status code 302, Location header field, with body

Result for this UA:

t302methods [TEST]

Test Results
FF27pass
MSIE11pass
Safaripass
Chr32pass
Konqfail (HEAD apparently times out (also: POST not rewritten to GET!) (see KDE Bug 330795)

method handling for 302 redirects

method should be preserved except for POST that may be rewritten to GET

303 (See Other)

Various tests checking status code 303.

t303empty [TEST] [R]

Test Results
FF27pass (displays empty page)
MSIE11pass (displays "Internet Explorer cannot display the webpage")
Safaripass (displays empty page)
Chr32pass (displays empty page)
Konqpass (displays empty page)

Status code 303, no Location header field, no content

Result for this UA:

t303body [TEST] [R]

Test Results
FF27pass (displays response body)
MSIE11fail (displays "Internet Explorer cannot display the webpage")
Safaripass (displays response body)
Chr32pass (displays response body)
Konqfail (does not display response body)

Status code 303, no Location header field, with body

Result for this UA:

t303loc [TEST] [R]

Test Results
FF27pass (follows redirect)
MSIE11pass (follows redirect)
Safaripass (follows redirect)
Chr32pass (follows redirect)
Konqpass (follows redirect)

Status code 303, Location header field, no body

Result for this UA:

t303bodyandloc [TEST] [R]

Test Results
FF27pass (follows redirect)
MSIE11pass (follows redirect)
Safaripass (follows redirect)
Chr32pass (follows redirect)
Konqpass (follows redirect)

Status code 303, Location header field, with body

Result for this UA:

t303methods [TEST]

Test Results
FF27pass
MSIE11fail (HEAD rewritten to GET)
Safarifail (HEAD rewritten to GET)
Chr32pass
Konqfail (HEAD apparently times out, all other methods preserved! (see KDE Bug 330795)

method handling for 303 redirects

method should be rewritten to GET except for HEAD

304 (Not Modified)

Various tests checking status code 304.

t304empty [TEST] [R]

Test Results
FF27pass (displays empty page)
MSIE11pass (displays empty page)
Safaripass (displays empty page)
Chr32pass (displays "This webpage is not found")
Konqpass (displays empty page)

Status code 304, no Location header field, no content

Result for this UA:

t304body [TEST] [R]

Test Results
FF27pass (displays empty page)
MSIE11pass (displays empty page)
Safaripass (displays empty page)
Chr32pass (displays "This webpage is not found")
Konqpass (displays empty page)

Status code 304, no Location header field, with body

Result for this UA:

t304loc [TEST] [R]

Test Results
FF27pass (displays empty page)
MSIE11pass (displays empty page)
Safaripass (displays empty page)
Chr32pass (displays "This webpage is not found")
Konqpass (displays empty page)

Status code 304, Location header field, no body

Result for this UA:

t304bodyandloc [TEST] [R]

Test Results
FF27pass (displays empty page)
MSIE11pass (displays empty page)
Safaripass (displays empty page)
Chr32pass (displays "This webpage is not found")
Konqpass (displays empty page)

Status code 304, Location header field, with body

Result for this UA:

305 (Use Proxy)

Various tests checking status code 305.

t305empty [TEST] [R]

Test Results
FF27pass (displays empty page)
MSIE11pass (displays empty page)
Safaripass (displays empty page)
Chr32pass (displays empty page)
Konqpass (displays empty page)

Status code 305, no Location header field, no content

Result for this UA:

t305body [TEST] [R]

Test Results
FF27pass (displays response body)
MSIE11pass (displays response body)
Safaripass (displays response body)
Chr32pass (displays response body)
Konqpass (displays response body)

Status code 305, no Location header field, with body

Result for this UA:

t305loc [TEST] [R]

Test Results
FF27pass (displays empty page)
MSIE11pass (displays empty page)
Safaripass (displays empty page)
Chr32pass (displays empty page)
Konqpass (follows redirect)

Status code 305, Location header field, no body

Result for this UA:

t305bodyandloc [TEST] [R]

Test Results
FF27pass (displays response body)
MSIE11pass (displays response body)
Safaripass (displays response body)
Chr32pass (displays response body)
Konqpass (follows redirect)

Status code 305, Location header field, with body

Result for this UA:

306

Various tests checking status code 306.

t306empty [TEST] [R]

Test Results
FF27pass (displays empty page)
MSIE11pass (displays empty page)
Safaripass (displays empty page)
Chr32pass (displays empty page)
Konqpass (displays empty page)

Status code 306, no Location header field, no content

Result for this UA:

t306body [TEST] [R]

Test Results
FF27pass (displays response body)
MSIE11pass (displays response body)
Safaripass (displays empty page)
Chr32pass (displays response body)
Konqfail (does not display response body)

Status code 306, no Location header field, with body

Result for this UA:

t306loc [TEST] [R]

Test Results
FF27pass (displays empty page)
MSIE11pass (displays empty page)
Safaripass (follows redirect)
Chr32pass (displays empty page)
Konqpass (displays empty page)

Status code 306, Location header field, no body

Result for this UA:

t306bodyandloc [TEST] [R]

Test Results
FF27pass (displays response body)
MSIE11pass (displays response body)
Safaripass (follows redirect)
Chr32pass (displays response body)
Konqpass (displays response body)

Status code 306, Location header field, with body

Result for this UA:

307 (Temporary Redirect)

Various tests checking status code 307.

t307empty [TEST] [R]

Test Results
FF27pass (displays empty page)
MSIE11pass (displays "Internet Explorer cannot display the webpage")
Safaripass (displays empty page)
Chr32pass (displays empty page)
Konqpass (displays empty page)

Status code 307, no Location header field, no content

Result for this UA:

t307body [TEST] [R]

Test Results
FF27pass (displays response body)
MSIE11fail (displays "Internet Explorer cannot display the webpage")
Safaripass (displays response body)
Chr32pass (displays response body)
Konqfail (does not display response body)

Status code 307, no Location header field, with body

Result for this UA:

t307loc [TEST] [R]

Test Results
FF27pass (follows redirect)
MSIE11pass (follows redirect)
Safaripass (follows redirect)
Chr32pass (follows redirect)
Konqpass (follows redirect)

Status code 307, Location header field, no body

Result for this UA:

t307bodyandloc [TEST] [R]

Test Results
FF27pass (follows redirect)
MSIE11pass (follows redirect)
Safaripass (follows redirect)
Chr32pass (follows redirect)
Konqpass (follows redirect)

Status code 307, Location header field, with body

Result for this UA:

t307methods [TEST]

Test Results
FF27pass
MSIE11pass
Safaripass
Chr32pass
Konqfail (HEAD apparently times out (see KDE Bug 330795)

method handling for 307 redirects

method should be preserved in all cases

308 (Permanent Redirect)

Various tests checking status code 308 (yes, just an Internet Draft, but it is approved and in the RFC Editor queue).

See also HTTPbis issue 312.

t308empty [TEST] [R]

Test Results
FF27pass (displays empty page)
MSIE11pass (displays empty page)
Safaripass (displays empty page)
Chr32pass (displays empty page)
Konqpass (displays empty page)

Status code 308, no Location header field, no content

Result for this UA:

t308body [TEST] [R]

Test Results
FF27pass (displays response body)
MSIE11pass (displays response body)
Safaripass (displays response body)
Chr32pass (displays response body)
Konqfail (does not display response body)

Status code 308, no Location header field, with body

Result for this UA:

t308loc [TEST] [R]

Test Results
FF27pass (follows redirect)
MSIE11pass (displays empty page)
Safaripass (follows redirect)
Chr32fail (displays empty page (see Chrome Issue 109012))
Konqpass (follows redirect)

Status code 308, Location header field, no body

Result for this UA:

t308bodyandloc [TEST] [R]

Test Results
FF27pass (follows redirect)
MSIE11pass (displays response body)
Safaripass (follows redirect)
Chr32fail (displays response body (see Chrome Issue 109012))
Konqpass (follows redirect)

Status code 308, Location header field, with body

Result for this UA:

t308methods [TEST]

Test Results
FF27pass
MSIE11fail (does not follow the redirect)
Safaripass
Chr32fail (does not follow the redirect (see Chrome Issue 109012))
Konqfail (HEAD apparently times out (see KDE Bug 330795))

method handling for 308 redirects (where status code 308 currently is experimental)

method should be preserved in all cases

399

Various tests checking status code 399, which, unless known, should be treated just like status code 300.

See also HTTPbis issue 325.

t399empty [TEST] [R]

Test Results
FF27pass (displays empty page)
MSIE11pass (displays empty page)
Safaripass (displays empty page)
Chr32pass (displays empty page)
Konqpass (displays empty page)

Status code 399, no Location header field, no content

Result for this UA:

t399body [TEST] [R]

Test Results
FF27pass (displays response body)
MSIE11pass (displays response body)
Safaripass (displays response body)
Chr32pass (displays response body)
Konqfail (does not display response body)

Status code 399, no Location header field, with body

Result for this UA:

t399loc [TEST] [R]

Test Results
FF27pass (displays empty page)
MSIE11pass (displays empty page)
Safaripass (follows redirect)
Chr32pass (displays empty page)
Konqpass (follows redirect)

Status code 399, Location header field, no body

Result for this UA:

t399bodyandloc [TEST] [R]

Test Results
FF27pass (displays response body)
MSIE11pass (displays response body)
Safaripass (follows redirect)
Chr32pass (displays response body)
Konqpass (follows redirect)

Status code 399, Location header field, with body

Result for this UA:

Fragment Handling

Various tests checking handling of fragment identifiers.

tfnry [TEST] [R]

Test Results
FF27pass (#A)
MSIE11pass (#A)
Safaripass (#A)
Chr32pass (#A)
Konqpass (#A)

Status code 302, Location header field present with fragment identifier "A" on redirect URI. See also HTTPbis issue 43.

Result for this UA:

tfyrn [TEST] [R]

Test Results
FF27pass (#B)
MSIE11pass (#B)
Safarifail (none!)
Chr32pass (#B)
Konqpass (#B)

Status code 302, source resource with fragment identifier "B", Location header field present without fragment identifier on redirect URI. See also HTTPbis issue 295.

Should navigate to fragment "B" (see Section 7.1.2 of draft-ietf-httpbis-p2-semantics-25)

Result for this UA:

tfyry [TEST] [R]

Test Results
FF27pass (#A)
MSIE11pass (#A)
Safaripass (#A)
Chr32pass (#A)
Konqpass (#A)

Status code 302, source resource with fragment identifier "B", Location header field present with fragment identifier "A" on redirect URI. See also HTTPbis issue 43.

Result for this UA:

Test Case Generation

Both this document and the indiviual test "scripts" are generated from one single XML source (httpcontenttype.xml), using an XSLT2 transformation (httpcontenttype.xslt).

To generate the files, an XSLT2 processor such as Saxon 9 is needed. Copy both files into an empty directory, then run:

saxon9 httpredirects.xml httpredirects.xslt > index.html

Note that this will also generate a set of "asis" files that contain the actual test cases. These can be served using the Apache httpd mod_asis module.