-
-
Notifications
You must be signed in to change notification settings - Fork 979
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
No need to call undocumented nodejs function ServerResponse._implicitHeader #888
Comments
Hello, and thank you for your issue. Yes, the internal If you have a solution that uses a different method but keeps all the behavior intact, please contribute a pull request :) ! |
has pulled a request : #900 |
I had the same issue :
Option 1) if (!res._implicitHeader) {
// Hack required until `express-<plugin>` get support for http2 (express-session)
res._implicitHeader = function(){ return; }; // Don't need, don't care
}
res.end(); This worked for me. Option 2) You should have something like: if (!res._header) {
res._implicitHeader()
} Needs to be replaced by: if (!res._header && res._implicitHeader) {
res._implicitHeader()
} This will skip the call for people using http2 or when Let me know if it worked for you guys. |
express-session call such code to ensure http header has been sent before writing data.
But nodejs has include such code in the ServerResponse class
write
function.Another side we should consider is that
http2.Http2ServerResponse
does not have the property of_implicitHeader
. When we start server via http2, the express-session will break.The text was updated successfully, but these errors were encountered: