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

Close connection without response on status code 444 #1134

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Dec 5, 2023

  1. Close connection without response on status code 444

    This patch adds the ability for stream handlers to bail out on a request
    and tell the internal HTTP.jl code to simply close the connection and to
    ignore any remaining data to be read or written.
    
    This is done by setting the response status code to the non-standard
    value 444, just like in nginx. If the status code is set to 444 when
    the request handler returns, the internal server code simply closes the
    connection. In particular this will skip calling `closeread` and
    `closewrite`, which both do some "consistency checks" that can't be
    avoided by using something like
    
    ```julia
    HTTP.setstatus(http, 444)
    close(http.stream)
    ```
    
    inside the request handler function directly.
    fredrikekre committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    641fbdb View commit details
    Browse the repository at this point in the history