-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
How to get the "Date" set on a response header for HTTP2? #30894
Comments
http
's res._header
: The value is set to true
(Boolean) instead of the raw headers (String) as in earlier versions of Nodehttp
's res._header
: The value is set to true
(Boolean) instead of the raw headers (String) as in earlier versions of Node
I think this is due to HTTP2 vs HTTP1. Can someone help clarify this? For HTTP2: how to get raw headers is my question? |
After digging I discovered HTTP1 has a String returned for node/lib/internal/http2/compat.js Lines 430 to 435 in 527b609
|
http
's res._header
: The value is set to true
(Boolean) instead of the raw headers (String) as in earlier versions of Node…ther investigated
So use node/lib/internal/http2/compat.js Lines 554 to 556 in c101251
AFAIK, I think we shouldn't rely on a "private" property that could change in value over time for various reasons. |
No, that does not work
…On December 11, 2019 10:58:33 AM UTC, ZYSzys ***@***.***> wrote:
So use `res.getHeaders()` ?
https://github.com/nodejs/node/blob/c101251a95cc82142bee4637f8db6cc360a06d82/lib/internal/http2/compat.js#L554-L556
AFAIK, I think we shouldn't rely on a "private" property that could
change in value over time for various reasons.
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#30894 (comment)
|
Could we have someone look at this on the core team? I would gladly donate. |
@niftylettuce I think the commit below should fix this. I'll open a PR soon. Refer: rexagod@8604411 |
@addaleax any chance this could get backported to v12 before next weeks release (that also fixes the core Chrome HTTP/2 XHR issue at #33875)? cc @BridgeAR @rexagod @codebytere Ref: https://www.theregister.com/2020/08/18/nodejs_chromium_patch/ |
Ref: #28302
The text was updated successfully, but these errors were encountered: