Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(fetch): re-calculate iterator after each iteration #1706

Conversation

KhafraDev
Copy link
Member

@KhafraDev KhafraDev commented Oct 15, 2022

Adds new WPTs from web-platform-tests/wpt@a31d3ba

Fixes 2 per-existing tests that were incorrect - I've confirmed that the behavior now matches Firefox.

Expect iterators for FormData and Headers to be much slower, as the optimizations undici did were incorrect.

From the PR itself:

In practice, this means that every iteration step needs to be performed on a Headers' sorted-and-combined headers list that should not be cached. Gecko seems to be the only engine doing this right, as both WebKit and Blink appear to carry out the entire iteration on a cached copy of the header list.

@codecov-commenter
Copy link

codecov-commenter commented Oct 15, 2022

Codecov Report

Base: 94.11% // Head: 94.19% // Increases project coverage by +0.07% 🎉

Coverage data is based on head (6ae456e) compared to base (8d6ddb7).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1706      +/-   ##
==========================================
+ Coverage   94.11%   94.19%   +0.07%     
==========================================
  Files          53       53              
  Lines        4943     4957      +14     
==========================================
+ Hits         4652     4669      +17     
+ Misses        291      288       -3     
Impacted Files Coverage Δ
lib/fetch/formdata.js 95.95% <100.00%> (-0.12%) ⬇️
lib/fetch/headers.js 96.57% <100.00%> (+2.09%) ⬆️
lib/fetch/util.js 85.16% <100.00%> (+1.22%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ronag ronag merged commit 2787b64 into nodejs:main Oct 16, 2022
metcoder95 pushed a commit to metcoder95/undici that referenced this pull request Dec 26, 2022
crysmags pushed a commit to crysmags/undici that referenced this pull request Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants