[Webkit-unassigned] [Bug 254010] Fetch POST Requests Not Working on Safari

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 16 10:47:57 PDT 2023


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

--- Comment #3 from Alexey Proskuryakov <ap at webkit.org> ---
So this isn't even a cross-origin request, both are localhost:60145 for you.

I cannot reproduce this with these steps:

- Put fetch.html (below) in LayoutTests/http/tests in a WebKit checkout.
- run-webkit-httpd
- load http://127.0.0.1:8000/fetch.html in Safari
- terminate run-webkit-httpd
- nc -l 8000
- Click the Test button on the page.

I always get the request body in nc output.


----- fetch.html

<button onclick="test()">Test</button>
<script>
function test() {
    fetch("http://127.0.0.1:8000/", {
     method: "POST",
     headers: {
     "Content-Type": "application/json",
     "Accept": "application/json",
     },
     body: '{"get_response": true}',
    })
}
</script>

-- 
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/20230316/efc8692a/attachment-0001.htm>


More information about the webkit-unassigned mailing list