Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set "Connection: close" for non-keep-alive requests
According to the HTTP 1.1 Spec: > An HTTP/1.1 server MAY assume that a HTTP/1.1 client intends to > maintain a persistent connection unless a Connection header including > the connection-token "close" was sent in the request. If the server > chooses to close the connection immediately after sending the > response, it SHOULD send a Connection header including the > connection-token close. https://www.rfc-editor.org/rfc/rfc2616#section-8.1.2.1 The Node.js `Request` module depends on getting the header `Connection: close` to properly sequence socket messages, otherwise it throws a "socket hang up" error. This issue was found due to Remix having a custom implementation of `fetch` that use's Node.js's `Request` module, which has different behavior than the native Node.js `fetch` global.
- Loading branch information