v5 response does not implement http.Hijacker
bohrasankalp opened this issue · 2 comments
bohrasankalp commented
I am using v5 version, and trying to implement websocket. I am getting websocket: response does not implement http.Hijacker
. I know from some closed issue it got fixed earlier. Is it done for v5
version as well.
My snippet
socket, err := upgrader.Upgrade(w, r, nil) if err != nil { return nil, err }
VojtechVitek commented
Hi,
Nothing changed in chi from v4 to v5 in this regard. Hijacker should be available for HTTP 1, see https://github.com/go-chi/chi/blob/master/middleware/wrap_writer.go#L26.
Is it possible that you have some other middleware down the chain that wraps ResponseWriter and doesn't implement Hijacker?
bohrasankalp commented
Thanks it because of one of the external middleware. I would fix it.