alexedwards / scs

HTTP Session Management for Go
MIT License
2.12k stars 165 forks source link

Implementing Hijack interface in sessionResponseWriter #189

Closed NewHouses closed 7 months ago

VipWW commented 8 months ago

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

ryanlath commented 7 months ago

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()
alexedwards commented 7 months ago

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

alexedwards commented 7 months ago

@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.