summaryrefslogtreecommitdiff
path: root/ext/node/ops/http2.rs
diff options
context:
space:
mode:
authorSatya Rohith <me@satyarohith.com>2024-07-29 17:03:55 +0530
committerGitHub <noreply@github.com>2024-07-29 13:33:55 +0200
commit8bab761bccf976ac568b0b3f4decfd7e77747767 (patch)
tree798debeb571b1d557506a9ba69fd927a162e5f84 /ext/node/ops/http2.rs
parentad5cec27d3ba67c67e501f612d361254def78194 (diff)
fix(ext/node): prevent panic in http2.connect with uppercase header names (#24780)
Closes https://github.com/denoland/deno/issues/24678
Diffstat (limited to 'ext/node/ops/http2.rs')
-rw-r--r--ext/node/ops/http2.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/node/ops/http2.rs b/ext/node/ops/http2.rs
index a13985f5a..9595cb33d 100644
--- a/ext/node/ops/http2.rs
+++ b/ext/node/ops/http2.rs
@@ -247,7 +247,7 @@ pub async fn op_http2_send_response(
}
for (name, value) in headers {
response.headers_mut().append(
- HeaderName::from_lowercase(&name).unwrap(),
+ HeaderName::from_bytes(&name).unwrap(),
HeaderValue::from_bytes(&value).unwrap(),
);
}
@@ -317,7 +317,7 @@ pub async fn op_http2_client_request(
for (name, value) in headers {
req.headers_mut().unwrap().append(
- HeaderName::from_lowercase(&name).unwrap(),
+ HeaderName::from_bytes(&name).unwrap(),
HeaderValue::from_bytes(&value).unwrap(),
);
}