-
Notifications
You must be signed in to change notification settings - Fork 311
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
Support (*http.ResponseController).Hijack() #455
Labels
Comments
Thanks for bringing this up, we'll have to update the minimum Go version to 1.20 or make an exception for 1.19, but this seems like a reasonable request 👍🏻. |
Open
mafredri
added a commit
that referenced
this issue
Aug 15, 2024
mafredri
added a commit
that referenced
this issue
Aug 21, 2024
Since we rely on the connection not being hijacked too early (i.e. detecting the presence of http.Hijacker) to set headers, we must manually implement the unwrapping of the http.ResponseController. By doing so, we also retain Go 1.19 compatibility without build tags. Fixes #455
mafredri
added a commit
that referenced
this issue
Aug 21, 2024
Since we rely on the connection not being hijacked too early (i.e. detecting the presence of http.Hijacker) to set headers, we must manually implement the unwrapping of the http.ResponseController. By doing so, we also retain Go 1.19 compatibility without build tags. Closes #455
mafredri
added a commit
that referenced
this issue
Aug 21, 2024
Since we rely on the connection not being hijacked too early (i.e. detecting the presence of http.Hijacker) to set headers, we must manually implement the unwrapping of the http.ResponseController. By doing so, we also retain Go 1.19 compatibility without build tags. Closes #455
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently the library checks
http.ResponseWriter
forhttp.Hijacker
support via type assertion.Is there a possibility we can use
(*http.ResponseController).Hijack()
instead? This way we can supporthttp.ResponseWriter
types that don't offerhttp.Hijacker
interface but their underlying unwrapped writers do.The text was updated successfully, but these errors were encountered: