开发者

HTTP GET Status Code "-1" on Safari - Any other browser reports status code 302 - Moved

开发者 https://www.devze.com 2023-03-30 04:06 出处:网络
We have a page where the user enters his credentials. The user is then redirected to the landing page but we just discovered recently that on Safari 5.1 the redirection doesn\'t occur and is reported

We have a page where the user enters his credentials. The user is then redirected to the landing page but we just discovered recently that on Safari 5.1 the redirection doesn't occur and is reported as an HTTP GET with status code -1:

Request URL:https://whatever.com/home.asp
Request Method:GET
Status Code:-1 
Request Headers
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding:gzip, deflate
Accept-Language:en-US
Origin:https://whatever.com
Referer:https://whatever.com/logon.asp?CTAuthMode=BASIC&language=en&CT_ORIG_URL=https%3A%2F%2Fsubdomain.whatever.com%3A443%2Fyadda%2FDefault.aspx&ct_orig_uri=https%3A%2F%2Fsubdomain.whatever.com%3A443%2Fyadda%2FDefault.aspx
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50

And the actual response content in Safari is this:

<head><title>Object moved</title></head>
<body><h1>Object Moved</h1>This object may be found <a HREF="https://whatever.com/logon.asp">here</a>.</body>
HTTP/1.1 302 Object moved
Cache-Control: private
Content-Length: 167
Content-Type: text/html
Location: https://subdomain.whatever.com/yadda/Default.aspx
Server: Microsoft-IIS/7.0
X-Powered-By: ASP.NET


<he开发者_高级运维ad><title>Object moved</title></head>
<body><h1>Object Moved</h1>This object may be found <a HREF="https://subdomain.whatever.com/yadda/Default.aspx">here</a>.</body>

Firefox reports something different:

Status: 302 Object moved
Domain: whatever.com
Size: 167 B

BUT when you look at the actual response's HTML in Firebug, it shows the actual landing page which is about 13.6 Kb in size.

Has any body seen this behavior in Safari? It happens on Windows (XP & 7) and Mac so the issue seems to be related to Safari itself. I don't know if this is a specific bug with my version of Safari or if older versions of Safari have the same issue.

Any suggestions to work around this issue are greatly appreciated.


This turned out to be a bug on Safari 5.1. Upgrading to version 5.1.1 fixed the issue

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号