[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:35:06 PDT 2023


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

--- Comment #2 from Pranay Yadav <pranayyadav08 at gmail.com> ---
the following snipped of code is used to make the request : 
fetch(REQUEST_URL, {
  method: "POST",
  headers: {
  "Content-Type": "application/json",
  "Accept": "application/json",
  },
  body: '{"get_response": true}',
})

but the request received on the backend is : 
"POST / HTTP/1.1\r\nHost: localhost:60145\r\nContent-Type: application/json\r\nOrigin: http://localhost:60145\r\nAccept-Encoding: gzip, deflate\r\nConnection: keep-alive\r\nAccept: application/json\r\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Safari/605.1.15\r\nReferer: http://localhost:60145/\r\nContent-Length: 22\r\nAccept-Language: en-IN,en-GB;q=0.9,en;q=0.8\r\n\r\n"

and after 300+ requests, the body was finally added and the request received on backend was : 
"POST / HTTP/1.1\r\nHost: localhost:60145\r\nContent-Type: application/json\r\nOrigin: http://localhost:60145\r\nAccept-Encoding: gzip, deflate\r\nConnection: keep-alive\r\nAccept: application/json\r\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Safari/605.1.15\r\nReferer: http://localhost:60145/\r\nContent-Length: 22\r\nAccept-Language: en-IN,en-GB;q=0.9,en;q=0.8\r\n\r\n{\"get_response\": true}"

-- 
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/74fe759e/attachment.htm>


More information about the webkit-unassigned mailing list