mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
fix(ext/node): define http.maxHeaderSize (#23479)
Closes https://github.com/denoland/deno/issues/23432
This commit is contained in:
parent
98e2f6d50b
commit
14ae4f897f
2 changed files with 7 additions and 0 deletions
|
@ -1820,6 +1820,8 @@ export function get(...args: any[]) {
|
||||||
return req;
|
return req;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const maxHeaderSize = 16_384;
|
||||||
|
|
||||||
export {
|
export {
|
||||||
Agent,
|
Agent,
|
||||||
ClientRequest,
|
ClientRequest,
|
||||||
|
@ -1848,4 +1850,5 @@ export default {
|
||||||
get,
|
get,
|
||||||
validateHeaderName,
|
validateHeaderName,
|
||||||
validateHeaderValue,
|
validateHeaderValue,
|
||||||
|
maxHeaderSize,
|
||||||
};
|
};
|
||||||
|
|
|
@ -998,3 +998,7 @@ Deno.test("[node/http] ServerResponse getHeaders", () => {
|
||||||
assertEquals(res.getHeaderNames(), ["bar", "foo"]);
|
assertEquals(res.getHeaderNames(), ["bar", "foo"]);
|
||||||
assertEquals(res.getHeaders(), { "bar": "baz", "foo": "bar" });
|
assertEquals(res.getHeaders(), { "bar": "baz", "foo": "bar" });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Deno.test("[node/http] maxHeaderSize is defined", () => {
|
||||||
|
assertEquals(http.maxHeaderSize, 16_384);
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in a new issue