mirror of
https://github.com/ading2210/libcurl.js.git
synced 2025-05-13 14:30:02 -04:00
fix handling of duplicate http headers
This commit is contained in:
parent
ca137c3cd2
commit
15179fae43
4 changed files with 15 additions and 6 deletions
|
@ -132,8 +132,11 @@ function create_response(response_data, response_info) {
|
|||
writable: false,
|
||||
value: new Headers()
|
||||
});
|
||||
for (let header_name in response_info.headers) {
|
||||
let header_value = response_info.headers[header_name];
|
||||
Object.defineProperty(response_obj, "raw_headers", {
|
||||
writable: false,
|
||||
value: response_info.headers
|
||||
});
|
||||
for (let [header_name, header_value] of response_info.headers) {
|
||||
response_obj.headers.append(header_name, header_value);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue