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
letmut headers = request.headers_mut();
headers.append("Host",HeaderValue::from_static("report-worker-2.noscription.org"),);
headers.insert("User-Agent",HeaderValue::from_str("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36").unwrap());dbg!(&header);
this code print:
[src/main.rs:41] &request.headers() = {
"user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
}
Some servers require the header name is case-sensitive, which may cause some server internal errors.
The text was updated successfully, but these errors were encountered:
IWANABETHATGUY
changed the title
Provide a way to keep the original header case.
Can we provided a way to keep the original header case.
Jan 5, 2024
IWANABETHATGUY
changed the title
Can we provided a way to keep the original header case.
Can we provided a way to keep the original header name case.
Jan 6, 2024
It's a bit complicated since that's how the underlying headers library behaved as far as I can recall. We'd need to find a workaround (essentially a kludge) if we want to make it work.
this code print:
Some servers require the header name is case-sensitive, which may cause some server internal errors.
The text was updated successfully, but these errors were encountered: