Comments (3)
Thanks for reporting, @Gerhut ! I do indeed see the Node.js docs have updated to note that req.socket
is no longer guaranteed to be there, and that there is a code path within Node.js itself that now unsets it. I will get a patch out for this module to account for this new behavior.
from finalhandler.
Sorry for the delay on this. It seems very convoluted on when exactly Node.js will make req.socket
null
. I see that there is a guard against that in req.destroy()
, though not a lot of other methods on req
. I believe we can just call req.destroy()
anyway, just verifying that will behave as expected across the supported Node.js versions of this module before landing, as it would be the simplest solution 👍
from finalhandler.
@dougwilson Any luck with this? I'm running into an occasional error where req.socket is null and req.socket.destroy ends up blowing up.
Undici in particular is clearing out the socket when we stream a request through it and the connection is suddenly killed.
from finalhandler.
Related Issues (16)
- Content-Type is always text/html; charset=utf-8 ? HOT 2
- Content type is html instead of text/plain HOT 6
- Cannot read property 'headersSent' of undefined HOT 14
- Respect `expose` on thrown errors HOT 2
- TypeError: Cannot read property 'headersSent' of undefined HOT 1
- Content-Security-Policy should use default-src 'none'. HOT 81
- Also read status from err.statusCode HOT 6
- npm audit security advisory 836 HOT 3
- npm security vulnerability HOT 7
- Any reason for awaiting complete requests before sending responses? HOT 5
- UnsupportedWarning: Status message is not supported by HTTP/2 (RFC7540 8.1.2.4) HOT 1
- req.socket.destroy is not a function HOT 2
- Print causes when outputting error stacks HOT 1
- allow uncaught errors to bubble HOT 7
- Remove trailing newline HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from finalhandler.