Skip to content
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

Set "Connection: close" for non-keep-alive requests #7087

Merged
merged 1 commit into from Mar 20, 2024

Commits on Mar 20, 2024

  1. 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.
    scotttrinh committed Mar 20, 2024
    Copy the full SHA
    43952a6 View commit details
    Browse the repository at this point in the history