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
tokio = { version = "1.32.0", features = ["rt-multi-thread", "macros"] }
reqwest = { version = "=0.11.20", default-features = false, features = [
"json",
"gzip",
"rustls-tls",
# "native-tls-vendored"
] }
When this is run with rustls-tls, the request headers include content-length: 0, but when run with native-tls-vendored the request headers do not include a content-length header.
When the request is made to http://... without any tls features enabled, the request headers do not include a content-length header either.
In short, reqwest sends a `content-length: 0` header in GET
requests for a reason maybe related to this issue:
seanmonstar/reqwest#1971
For now, let's ignore Content-Length header lines.
Byron
added a commit
to NobodyXu/gitoxide
that referenced
this issue
Mar 21, 2024
In short, reqwest sends a `content-length: 0` header in GET
requests for a reason maybe related to this issue:
seanmonstar/reqwest#1971
For now, let's ignore Content-Length header lines.
Byron
added a commit
to NobodyXu/gitoxide
that referenced
this issue
Mar 21, 2024
In short, reqwest sends a `content-length: 0` header in GET
requests for a reason maybe related to this issue:
seanmonstar/reqwest#1971
For now, let's ignore Content-Length header lines.
Whether the client sends a
content-length
header depends on what features are enabled.Should this be inconsistent? Is this even something reqwest can control or is at the level of the tls libraries?
Given the code:
with dependencies
When this is run with
rustls-tls
, the request headers includecontent-length: 0
, but when run withnative-tls-vendored
the request headers do not include acontent-length
header.When the request is made to
http://...
without any tls features enabled, the request headers do not include acontent-length
header either.I have no idea if this requestbin is permanent or not, but you can see my tests here: https://public.requestbin.com/r/en4ai3fohs7sk.
Related: #1873
The text was updated successfully, but these errors were encountered: