You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fetching headers from the object is deprecated, and when requestWillBeSentExtraInfo when it is provided, headers should be fetched from there.
Currently, chrome-har gets headers from the response object and generates cookies from it. One consequence of using the wrong headers is that some cookies are missing.
In the existing test suite of JSON files, there are requestWillBeSentExtraInfoheader fields that contain cookies that are not present in the response.requestHeaders and response.requestHeaders fields.
I discovered this issue while experimenting with porting/re-writing chrome-har in typescript and trying to replicate chrome-har's current behavior. Please feel free to compare against the typescript implementation to test the fix, or to adopt the code from it, which is also MIT license. (You're free to take the whole thing, but it's a very big change of coding style to adapt to if you don't like typescript.) Sorry that the first you are hearing from me is me filing bugs, but leaving them unreported seemed worse than the alternative.
The text was updated successfully, but these errors were encountered:
UppaJung
changed the title
Cookies in the requestWillBeSentExtraInfo event header field are missing
Incorrect headers used, leading to problems including missing cookies
Sep 28, 2024
Fetching headers from the object is deprecated, and when
requestWillBeSentExtraInfo
when it is provided, headers should be fetched from there.Currently,
chrome-har
gets headers from theresponse
object and generates cookies from it. One consequence of using the wrong headers is that some cookies are missing.In the existing test suite of JSON files, there are
requestWillBeSentExtraInfo
header
fields that contain cookies that are not present in the response.requestHeaders and response.requestHeaders fields.I discovered this issue while experimenting with porting/re-writing
chrome-har
in typescript and trying to replicatechrome-har
's current behavior. Please feel free to compare against the typescript implementation to test the fix, or to adopt the code from it, which is also MIT license. (You're free to take the whole thing, but it's a very big change of coding style to adapt to if you don't like typescript.) Sorry that the first you are hearing from me is me filing bugs, but leaving them unreported seemed worse than the alternative.The text was updated successfully, but these errors were encountered: