Skip to content

Implement http.Hijacker to support interaction with Websockets #26

Closed
@durdn

Description

@durdn

Hey there,

You wrote a fantastic library and I've been using it with pleasure so far.

I have run into an issue when using the GzipHandler and gorilla/websocket (and I saw reports of similar failures for code.google.com/p/go.net/websocket):

I run into this:

websocket: response does not implement http.Hijacker

It seems the response interface of your library does not implement http.Hijacker which is needed to use websockets.

The fix appears relatively easy and several other libraries have implemented a fix. For example:

caddyserver/caddy@05957b4

https://github.com/gin-gonic/gin/pull/105/files

Other useful thread:
gin-gonic/gin#51

I probably can work around my problem by not using the GzipHandler in bulk for all my routes but I thought you'd be interested in the problem and possibly copy the fixes above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions