Post

Replies

Boosts

Views

Activity

fetch doesn't read all headers from Response
I'm trying to use web-extensions on Safari 14 Preview Safari Technology Preview: Release 109 (Safari 14.0, WebKit 15610.1.17.2) macOS Catalina: 10.15.6 Beta (19G60d) I'm trying to read a custom header from HTTP Response from background script, I see this header in the Response Headers list using a Network Tool, but the Response of fetch doesn't contain some headers Example: fetch('https://postman-echo.com/response-headers?foo1=bar1&foo2=bar2').then(response => { 	for (var header of response.headers) { 		console.log(header); 	} }); What the code returns in Chrome: ["content-length", "29"] ["content-type", "application/json; charset=utf-8"] ["date", "Wed, 01 Jul 2020 21:29:47 GMT"] ["etag", "W/"1d-PgOLWVqd2mMvcpNzTF0Cfy4hftg""] ["foo1", "bar1"] ["foo2", "bar2"] ["status", "200"] ["vary", "Accept-Encoding"] Total: 8 fields What the code returns in Safari 14.0: ["content-length", "29"] ["content-type", "application/json; charset=utf-8"] ["date", "Wed, 01 Jul 2020 21:31:23 GMT"] ["etag", "W/\"1d-PgOLWVqd2mMvcpNzTF0Cfy4hftg\""] ["vary", "Accept-Encoding"] Total: 5 fields. foo1 and foo2 are missing, also status is missing too Response Headers :status: 200 Vary: Accept-Encoding Content-Type: application/json; charset=utf-8 Set-Cookie: sails.sid=s%3AVlXEk_Qo8GegZlyxPTVLlNInedtBVa6o.V3TX3KUohXJDyDD%2FL236OlZQILg%2BmKhAb09%2B0jZvDCM; Path=/; HttpOnly Date: Wed, 01 Jul 2020 21:51:02 GMT Content-Length: 29 ETag: W/"1c-x3TYsdbI+1JXz1RgJMU9sClKyGc" foo1: bar1 foo2: bar2
6
0
2k
Jul ’20