mswjs / interceptors

Low-level network interception library.
https://npm.im/@mswjs/interceptors
MIT License
570 stars 128 forks source link

fix(ClientRequest): improve rawHeaders recording #602

Closed mikicho closed 4 months ago

mikicho commented 4 months ago

@kettanaito The problem was that we didn't unset the kRestorePatches symbol on dispose

I think my solution may not be "private" enough because I set it to be configurable. Alternatively, we can conditionally return undefined by toggling a variable, but it's smelly and error-prone. What is the best solution here?

kettanaito commented 4 months ago

Some tests are failing 🤦 Forgot to test on latest v18/v20.

kettanaito commented 4 months ago

There's a breaking change in Headers behavior between the minor versions of v18 of Node. The latest v18 works as expected. I will suggest people to update to the latest if they encounter any issues.

kettanaito commented 4 months ago

Fixed the compatibility with the latest v18/v20. The tests are finally green again.

@mikicho, could you please give these changes another look once you have a moment? Thank you.

mikicho commented 4 months ago

@kettanaito LGTM

kettanaito commented 4 months ago

Forgot to add unit tests for .append() and .set(). Will add and merge today/tomorrow /cc @mikicho

kettanaito commented 4 months ago

Released: v0.33.1 🎉

This has been released in v0.33.1!

Make sure to always update to the latest version (npm i @mswjs/interceptors@latest) to get the newest features and bug fixes.


Predictable release automation by @ossjs/release.