Comments (4)
@KhafraDev do you know if this is one of the WPT we skip?
from undici.
content-length is a forbidden header which we don't implement, leads to a lot of edge cases like this
from undici.
diff --git a/lib/web/fetch/index.js b/lib/web/fetch/index.js
index 5fbef495..34de3aa7 100644
--- a/lib/web/fetch/index.js
+++ b/lib/web/fetch/index.js
@@ -1432,7 +1432,7 @@ async function httpNetworkOrCacheFetch (
// `Content-Length`/contentLengthHeaderValue to httpRequest’s header
// list.
if (contentLengthHeaderValue != null) {
- httpRequest.headersList.append('content-length', contentLengthHeaderValue, true)
+ httpRequest.headersList.set('content-length', contentLengthHeaderValue, true)
}
// 9. If contentLengthHeaderValue is non-null, then append (`Content-Length`,
from undici.
This isn't a bug, we mention this in the docs as something we don't implement. https://github.com/nodejs/undici?tab=readme-ov-file#forbidden-and-safelisted-header-names
from undici.
Related Issues (20)
- TypeError and Access Issues in jsdom Environment Post Update to undici 6.16.0 HOT 4
- websocket: a number of conditions fail the connection but do not emit an error event
- websocket: handle parser errors more consistently
- running autobahn test suite HOT 4
- Failing autobahn tests HOT 6
- Interceptors: add response decompress interceptor HOT 4
- Implement Request/Response `.bytes()` method
- permessage-deflate support in websocket HOT 1
- Optimization of websocket masking HOT 9
- bug: spreading `Headers` object has breaking behavior in versions between Node 20.12 and 20.13 HOT 9
- Limit the maximum numbers of open sockets HOT 2
- interceptors: move `throwOnError` to interceptor HOT 2
- interceptors: move signal handling to interceptor
- Support for custom proxy auth schemes HOT 7
- Nightly tests are failing HOT 2
- do not encode with encodeURIComponent if query with method GET passed. HOT 4
- Retry Handler Fails When Request Has a Body HOT 5
- autobahn workflow is always 1 commit behind HOT 1
- Nightly tests are failing HOT 3
- (regression?) timeouts while reading a body no longer abort with a TimeoutError HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from undici.