// Requires Meddler v2.2.1.2 from http://www.fiddler2.com/meddler/ // See http://blogs.msdn.com/ieinternals/archive/2009/10/13/Using-Meddler-to-Simulate-HTTP.aspx for more information // When a page contains a META declaration that specifies a CHARSET, IE's pre-parser is forced to restart. // In IE8 RTW, that restart causes problems in the speculative downloader. // To repro, start Fiddler, run this script in Meddler, and open the following link. The script will // show a popup "Fail" message whenever a malformed speculative download URL is dereferenced. Note that // you may have to open a few copies of the page (hit CTRL+K on the open tab) to experience the problem. // http://ipv4.fiddler:8088/hammer/yesmeta // Be sure to adjust the port if needed (see the "Listen Port" in the Meddler status bar). // Don't forget to enable Streaming in Fiddler. // // The IE8 bug was fixed in the 3/30/2010 cumulative update for IE, and hence this script will not show the FAIL // message for a properly patched client. // // Open a Single instance. // http://ipv4.fiddler:8088/yesmeta // Remove the META, remove the bug. // http://ipv4.fiddler:8088/nometa // http://ipv4.fiddler:8088/hammer/nometa import Meddler; import System; import System.Net.Sockets; import System.Windows.Forms; class Handlers { static function OnConnection(oSession: Session) { if (oSession.ReadRequest()) { if (oSession.urlContains("favicon.ico")){ oSession.WriteString("HTTP/1.1 404 NoIcon\r\nCache-Control: no-cache\r\nContent-Length: 0\r\n\r\n"); } else if (oSession.urlContains("hammer")){ oSession.WriteString("HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Type: text/html\r\n\r\n"); for (var iFrm = 0; iFrm < 20; iFrm++){ var sMeta = ""; if (oSession.urlContains("nometa")) { sMeta = "nometa"; } oSession.WriteString(""); } } else { if (!oSession.urlContains('/s')){ var sHeader = "HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Type: text/html\r\n\r\n"; var s = '
\r\n"; if (!oSession.urlContains("nometa")){ s = s + ''; } else { s = s + ''; } for (var x=0; x<3; x++){ var sx = "" + x; s = s +""; } oSession.WriteString(sHeader + s); System.Threading.Thread.Sleep(10); oSession.WriteString(""); for (var x=0; x<100; x++){ oSession.WriteString('"'+Meddler.Fuzz.NewString('$', 128) + "\"