[Webkit-unassigned] [Bug 231875] New: Web Inspector:

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Oct 16 21:12:45 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=231875

            Bug ID: 231875
           Summary: Web Inspector:
           Product: WebKit
           Version: Safari 15
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Inspector
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: finesserus at gmail.com
                CC: inspector-bugzilla-changes at group.apple.com

The "Network" tab of the Safari's Web Inspector doesn't show the bodies of AJAX requests sent with a Blob. It makes it harder to use Safari for a website development, because it's impossible to see request bodies.

To reproduce, open any website in Safari and run these commands in the browser console:

    fetch('/test', {method: 'post', body: new Blob(['{"foo":"bar"}'], {type: 'application/json'})});
    var req = new XMLHttpRequest(); req.open('post', '/test', true); req.send(new Blob(['{"foo":"bar"}'], {type: 'application/json'}));

Then open the "Network" tab, open a request produced by these commands and try to find the request body. The request body is not shown. I expect to see the request body at the very bottom of the "Headers" section and in the "Preview" section (after selecting "Request" in the top right corner).

The following commands produce absolutely the same requests, but their bodies are visible in the Web Inspector:

    fetch('/test', {method: 'post', headers: {'Content-Type': 'application/json'}, body: '{"foo":"bar"}'});
    fetch('/test', {method: 'post', headers: {'Content-Type': 'application/json'}, body: new TextEncoder().encode('{"foo":"bar"}')});
    var req = new XMLHttpRequest(); req.open('post', '/test', true); req.setRequestHeader('Content-Type', 'application/json'); req.send('{"foo":"bar"}');
    var req = new XMLHttpRequest(); req.open('post', '/test', true); req.setRequestHeader('Content-Type', 'application/json'); req.send(new TextEncoder().encode('{"foo":"bar"}'));

Web Inspector shows bodies sent with Uint8Array, so I suppose it's possible to display Blob requests too.

I can reproduce it in macOS Safari 15.0, macOS Safari TP 15.4, iOS Safari 13.1.2 and iOS Safari 15.1. I didn't check in other conditions.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211017/3b4ec40b/attachment-0001.htm>


More information about the webkit-unassigned mailing list