scs icon indicating copy to clipboard operation
scs copied to clipboard

Implementing Hijack interface in sessionResponseWriter

Open NewHouses opened this issue 2 years ago • 1 comments

NewHouses avatar Nov 28 '23 22:11 NewHouses

@alexedwards would you consider merging these changes? They are more than useful for websockets

wosienko avatar Feb 02 '24 13:02 wosienko

Yes, please merge. Your library doesn't work for me without it.

Also @NewHouses, if you want to simply it more...

return sw.ResponseWriter.(http.Hijacker).Hijack()

ryanlath avatar Feb 19 '24 18:02 ryanlath

@ryanlath Please see https://github.com/alexedwards/scs/issues/188

alexedwards avatar Feb 19 '24 19:02 alexedwards

@NewHouses I've implemented this in commit https://github.com/alexedwards/scs/commit/a38e822451b69071afa6fd12667d50df4563d20f. I felt that using http.ResponseController and build tags to restrict the functionality to Go 1.20+ was a better option here.

alexedwards avatar Feb 19 '24 19:02 alexedwards