You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Clean up the incoming object if the request is not completely finished. (#252)
* feat: Clean up the incoming object if the request is not completely finished.
* feat: add autoCleanupIncoming option to disable auto cleanup of incoming request body
* test: add test cases for partially consumed and cancelled request body
* test: added test for incomplete requests with low-level sockets, a pattern that causes automatic cleanup.
* test: ignore test/app.ts in jest.config.js
* test: skip test for partially consumed pattern in v18
* fix: typo
* docs: fix typo
* fix: eliminate environment dependence of type loading
Co-authored-by: Yusuke Wada <[email protected]>
---------
Co-authored-by: Yusuke Wada <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -125,6 +125,18 @@ serve({
125
125
})
126
126
```
127
127
128
+
### `autoCleanupIncoming`
129
+
130
+
The default value is `true`. The Node.js Adapter automatically cleans up (explicitly call `destroy()` method) if application is not finished to consume the incoming request. If you don't want to do that, set `false`.
131
+
If the application accepts connections from arbitrary clients, this cleanup must be done otherwise incomplete requests from clients may cause the application to stop responding. If your application only accepts connections from trusted clients, such as in a reverse proxy environment and there is no process that returns a response without reading the body of the POST request all the way through, you can improve performance by setting it to `false`.
0 commit comments