WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
24194
XHR body empty in inspector
https://bugs.webkit.org/show_bug.cgi?id=24194
Summary
XHR body empty in inspector
Rene van Lieshout
Reported
2009-02-26 03:03:23 PST
When a resource is clicked _before_ it finished loading, the body stays empty. Steps to reproduce bug - Open example script (source below):
http://rene.lico.nl/safari.php
- Open inspector - Click "Resources" - Click last resource "safari.php"e; (resource should be loading while you click on it) - Wait for the resource to load ("Response headers" appear) - The body is empty - Wait for another resource to load - Click the loaded resource (note: this should not be the resource you've clicked at step 3) - The body contains "-- test --" Comments - If you don't wait for a resource to complete before you open it in the inspector, the body stays empty. - The body should contain "-- test --" - The XHR is delayed by 5 seconds and looped until infinity. - Only tested in "Version 4 Public Beta (5528.16)" and "Version 4 Public Beta (5528.16,
r41242
) on "Mac OS X 10.5.6, intel c2d 2 ghz" Source <? if (array_key_exists("test",$_GET)) { sleep(5); die("-- test --"); } ?> <html> <head> <title>Webkit XHR test</title> <script type="text/javascript" charset="utf-8"> function init_test () { loadXMLDoc() } var req; function loadXMLDoc() { req = new XMLHttpRequest(); req.onreadystatechange = processReqChange; req.open("GET", '<?=$_SERVER["PHP_SELF"]?>?test=1', true); req.send(""); } function processReqChange() { if (req.readyState == 4 && req.status == 200) { loadXMLDoc(); } } </script> </head> <body onload="init_test();"> <h1>Bug: XHR request empty in inspector</h1> <h2>Steps to reproduce bug</h2> <ol> <li>Open inspector</li> <li>Click "Resources"</li> <li>Click last resource "safari.php"e; (resource should be loading while you click on it)</li> <li>Wait for the resource to load ("Response headers" appear)</li> <li style="color: red;">The body is empty</li> <li>Wait for another resource to load</li> <li>Click the loaded resource (note: this should not be the resource you've clicked at step 3)</li> <li style="color: green;">The body contains "-- test --"</li> </ol> <h2>Comments</h2> <ul> <li>If you don't wait for a resource to complete before you open it in the inspector, the body stays empty.</li> <li>The body should contain "-- test --"</li> <li>The XHR is delayed by 5 seconds and looped until infinity.</li> </ul> </body> </html>
Attachments
Add attachment
proposed patch, testcase, etc.
Anthony Ricaud
Comment 1
2009-02-26 08:45:39 PST
Confirmed with
r41242
Rene van Lieshout
Comment 2
2010-06-15 01:19:00 PDT
This bug seems resolved in at least Safari version 5.0 (6533.16) The only issue remaining is that when the XHR is loaded, the tab headers disappears and the content is replaced by the response of the request. There should be two tabs visible: headers and content.
Alexey Proskuryakov
Comment 3
2010-06-15 10:49:31 PDT
> The only issue remaining
Could you please file a new bug about that?
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug