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

fetch-networking: fix parsing of HTTP headers #1182

Merged
merged 7 commits into from
Nov 17, 2024
Merged
4 changes: 2 additions & 2 deletions src/browser/fetch_network.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ async function on_data_http(data)

let req_headers = new Headers();
for(let i = 1; i < headers.length; ++i) {
let parts = headers[i].split(": ");
let parts = headers[i].split(/:(.+)/);
SuperMaxusa marked this conversation as resolved.
Show resolved Hide resolved
let key = parts[0].toLowerCase();
let value = parts[1];
let value = parts[1].trim();
copy marked this conversation as resolved.
Show resolved Hide resolved
if( key === "host" ) target.host = value;
else if( key.length > 1 ) req_headers.set(parts[0], value);
SuperMaxusa marked this conversation as resolved.
Show resolved Hide resolved
}
Expand Down
Loading