Bug 47425 - Fails to follow HTTP 300 redirect
Summary: Fails to follow HTTP 300 redirect
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-08 11:11 PDT by Joe Nelson
Modified: 2023-05-28 06:53 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Nelson 2010-10-08 11:11:23 PDT
Safari Version 5.0.2 (5533.18.5) does not follow a 300 redirect for a page served from my localhost.

HTTP details:
Request URL:http://localhost/sales?near=53711&in=Copps
Request Method:GET
Status Code:300 Multiple Choices
Request Headers
Accept:application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
User-Agent:Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_5_8; en-us) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5
Response Headers
Cache-Control:public
Connection:Keep-Alive
Content-Encoding:gzip
Content-Length:21
Content-Type:text/html
Date:Fri, 08 Oct 2010 17:50:20 GMT
Expires:Fri, 08 Oct 2010 23:59:59 GMT
Keep-Alive:timeout=5, max=100
Location:/sales?near=53711&in=Copps&at=43.046538+-89.324390
Server:Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.7l DAV/2 PHP/5.3.0
Vary:Accept-Encoding
X-Powered-By:PHP/5.3.0

However, Safari redirects properly when given HTTP code 302.
HTTP details:
equest URL:http://localhost/sales?near=53711&in=Copps
Request Method:GET
Status Code:302 Found
Request Headers
Accept:application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
User-Agent:Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_5_8; en-us) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5
Response Headers
Cache-Control:public
Connection:Keep-Alive
Content-Encoding:gzip
Content-Length:21
Content-Type:text/html
Date:Fri, 08 Oct 2010 18:08:03 GMT
Expires:Fri, 08 Oct 2010 23:59:59 GMT
Keep-Alive:timeout=5, max=100
Location:/sales?near=53711&in=Copps&at=43.046538+-89.324390
Server:Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.7l DAV/2 PHP/5.3.0
Vary:Accept-Encoding
X-Powered-By:PHP/5.3.0
Comment 1 Joe Nelson 2010-10-08 11:24:54 PDT
This may not be a bug; the HTTP/1.1 specification says about code 300
"If the server has a preferred choice of representation, it SHOULD include the specific URI for that representation in the Location field; user agents MAY use the Location field value for automatic redirection. This response is cacheable unless indicated otherwise."

Firefox follows the redirect, so maybe Safari should as well?
Comment 2 Anne van Kesteren 2023-05-28 06:53:02 PDT
A response needs to be a redirect status as per https://fetch.spec.whatwg.org/#redirect-status in order for it to redirect.