Uh oh!
There was an error while loading. Please reload this page.
http2: Fix "ERR_HTTP2_INVALID_CONNECTION_HEADERS" error when adding "connection' into header - #23908
http2: Fix "ERR_HTTP2_INVALID_CONNECTION_HEADERS" error when adding "connection' into header#23908sagitsofan wants to merge 22 commits into
Conversation
jasnell
left a comment
There was a problem hiding this comment.
This would change the behavior for non-compat mode also, which is not ideal. The check should be done in compat.js rather than in util.js
Uh oh!
There was an error while loading. Please reload this page.
Ok. |
apapirovski
left a comment
There was a problem hiding this comment.
This is unfortunately not the right approach. I've left some comments.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
sagitsofan
commented
Nov 23, 2018
sagitsofan
commented
Nov 30, 2018
What about this PR, it is waiting for approval long time. |
dougwilson
commented
Nov 30, 2018
Hi @sagitsofan , I was just a passer by, similar to you and just had a comment; I don't have the ability to move this further along and eventually merge, sorry. |
mcollina
left a comment
There was a problem hiding this comment.
LGTM
@jasnell@apapirovski can you check again?
mcollina
commented
Dec 3, 2018
@sagitsofan can you please update the title/description on the PR to something more related the actual change? |
mcollina
commented
Dec 3, 2018
connection headerconnection headerconnection headerconnection headerconnection into headerconnection into header@mcollina i updated the title and description and fix the conflicts |
sagitsofan
commented
Dec 8, 2018
@jasnell@apapirovski Can you please review? |
sagitsofan
commented
Dec 11, 2018
@jasnell ? |
mcollina
commented
Dec 11, 2018
Can you please add a unit test? |
Ignoring the connection header and disable the `ERR_HTTP2_INVALID_CONNECTION_HEADERS` error. Added a warning log on the compatibility. Fixes: nodejs#23748
sagitsofan
commented
Dec 15, 2018
mcollina
left a comment
There was a problem hiding this comment.
The test should verify if the warning is emitted.
@mcollina, I have verified that the warning is emitted and also i am making sure that adding the |
sagitsofan
commented
Dec 19, 2018
@jasnell Pinging again :-) |
sagitsofan
commented
Dec 20, 2018
Thanx. |
| if (name !== constants.HTTP2_HEADER_CONNECTION) | ||
| return true; | ||
| else | ||
| return value === 'trailers'; |
There was a problem hiding this comment.
Nit: this could be simplified to:
returnname!==constants.HTTP2_HEADER_CONNECTION||value==='trailers';BridgeAR
commented
Dec 20, 2018
BridgeAR
commented
Mar 4, 2019
Landed in 8c597df 🎉 I took the liberty to improve the commit message and addressed my nit while landing. |
When using the compatibility API the connection header is from now on ignored instead of throwing an `ERR_HTTP2_INVALID_CONNECTION_HEADERS` error. This logs a warning in such case to notify the user about the ignored header. PR-URL: nodejs#23908Fixes: nodejs#23748 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
When using the compatibility API the connection header is from now on ignored instead of throwing an `ERR_HTTP2_INVALID_CONNECTION_HEADERS` error. This logs a warning in such case to notify the user about the ignored header. PR-URL: #23908Fixes: #23748 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
When using the compatibility API the connection header is from now on ignored instead of throwing an `ERR_HTTP2_INVALID_CONNECTION_HEADERS` error. This logs a warning in such case to notify the user about the ignored header. PR-URL: #23908Fixes: #23748 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
When using the compatibility API the connection header is from now on ignored instead of throwing an `ERR_HTTP2_INVALID_CONNECTION_HEADERS` error. This logs a warning in such case to notify the user about the ignored header. PR-URL: #23908Fixes: #23748 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
lib: http2 compatibility connection header
When adding the
connectionheader intohttp2 response, an
ERR_HTTP2_INVALID_CONNECTION_HEADERSerror is thrown.
This PR is ignoring the connection header and disable the
ERR_HTTP2_INVALID_CONNECTION_HEADERSerror.A new warning log is emitted on the compatibility.
Fixes: #23748
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes