2013-08-13 13 views
5

Im das folgende Problem mit IE10 (anderem Browser wie Firefox, Opera, Chrome und älteren IE-Versionen zu erleben scheint nicht betroffen zu sein.IE10 folgende HTTP 302-Umleitung zweimal

(1) Der Browser trifft auf eine Seite, die antwortet mit einem HTTP 302 Umleitung zu einer anderen Stelle (um eine Anmeldung durchzuführen):

Anfrage:

GET https://www.domain-one.de/startpage.aspx?... HTTP/1.1 
Accept: text/html, application/xhtml+xml, */* 
Accept-Language: de-DE 
User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0) 
Accept-Encoding: gzip, deflate 
DNT: 1 
Host: www.domain-one.de 
Pragma: no-cache 
Connection: Keep-Alive 
Cookie: ... 

Antwort:

HTTP/1.1 302 Found 
Cache-Control: private 
Content-Type: text/html; charset=utf-8 
Location: https://login.domain-two.com/login?tid=hGZmFb77-9VyiwfkhIXIRMDp 
Server: Microsoft-IIS/7.5 
X-AspNet-Version: 4.0.30319 
X-Powered-By: ASP.NET 
P3P: CP="NOi CURa TAIa OUR NOR UNI" 
Date: Tue, 13 Aug 2013 19:01:22 GMT 
Content-Length: 190 

<html><head><title>Object moved</title></head><body> 
<h2>Object moved to <a href="https://login.domain-two.com/login?tid=hGZmFb77-9VyiwfkhIXIRMDp">here</a>.</h2> 
</body></html> 

(2) IE folgt dieser Umleitung. Der Server setzt einige coookies und Umleitungen an den ursprünglichen Standort zurück:

Anfrage:

GET https://login.domain-two.com/login?tid=hGZmFb77-9VyiwfkhIXIRMDp HTTP/1.1 
Accept: text/html, application/xhtml+xml, */* 
Accept-Language: de-DE 
User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0) 
Accept-Encoding: gzip, deflate 
Host: login.domain-two.com 
DNT: 1 
Cookie: ... 
Pragma: no-cache 
Connection: Keep-Alive 

Antwort:

HTTP/1.1 302 Found 
Date: Tue, 13 Aug 2013 19:01:22 GMT 
Server: Apache 
P3P: CP="NOI CURa TAIa OUR NOR UNI" 
Location: https://www.domain-one.de/BackFromLogin.aspx?TID=hGZmFb77-9VyiwfkhIXIRMDp 
Content-Length: 277 
Keep-Alive: timeout=2, max=100 
Connection: Keep-Alive 
Content-Type: text/html; charset=iso-8859-1 

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> 
<html><head> 
<title>302 Found</title> 
</head><body> 
<h1>Found</h1> 
<p>The document has moved <a href="https://dwww.domain-one.de/BackFromLogin.aspx?TID=hGZmFb77-9VyiwfkhIXIRMDp">here</a>.</p> 
</body></html> 

(3) Bis zu hier scheint alles normal. Jedoch ignoriert IE10 jetzt die Antwort nur erhalten und folgt die gleiche Umleitung wieder:

Anfrage:

GET https://login.domain-two.com/login?tid=hGZmFb77-9VyiwfkhIXIRMDp HTTP/1.1 
Accept: text/html, application/xhtml+xml, */* 
Accept-Language: de-DE 
User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0) 
Accept-Encoding: gzip, deflate 
Host: login.domain-two.com 
DNT: 1 
Connection: Keep-Alive 
Cookie: ... 

Dieser Server diese doppelte Anforderung erkennt und verwirft sie, reagiert mit einer Fehlerseite (ich weiß, HTTP GET sollte idempotent sein, aber so funktioniert diese Seite).

Es ist mir ein Rätsel, warum IE10 die ursprüngliche Antwort ignoriert und gibt die gleiche Anforderung wieder (wenn auch ohne den ‚Pragma: no-cache‘ Header). Hast du irgendeine Idee?

+0

Können Sie ein Fiddler-Capture teilen, das dieses Verhalten demonstriert? IE könnte so etwas tun, wenn die Antwortverbindung vor dem Lesen RST war, aber das scheint unwahrscheinlich. – EricLaw

Antwort

0

Ich habe gerade eine Lösung gefunden (nachdem ich Ihren Beitrag gesehen habe). Es ist hier beschrieben http://support.microsoft.com/kb/2691205

In meinem Fall, ich öffnete einen Dialog (mit jquery), die einen iframe enthielt. Anstatt das src in den iframe zu setzen (zB), habe ich dem Dialog-Popup ein wenig Javascript hinzugefügt.

html = '<iframe id="myIframe">iframe not supported</iframe>'; 

$('#' + dialogId).append(html); 
$('#' + dialogId).dialog({ 
title: 'SOME TITLE', 
open: function() { $('#' + dialogId + 'iframe').attr('src', url); } //IE10 HACK to  prevent double request!!!! 

});