ElasticPerch / epws

A fast, well-tested and widely used WebSocket implementation for Go.
BSD 2-Clause "Simplified" License
5 stars 1 forks source link

Improve upgrader documentation regarding protocols #13

Open tebruno99 opened 1 year ago

tebruno99 commented 1 year ago

From websocket created by garyburd: gorilla/websocket#404

Points to cover

tebruno99 commented 1 year ago

Originial Comment: @marti1125

It looks like you added a Sec-WebSocket-Extensions header, but that header is unrelated to subprotocols. Did you you intend to add a Sec-Websocket-Protocol instead?

tebruno99 commented 1 year ago

Originial Comment: @IngCr3at1on

Hi, @marti1125 yes absolutely! Documentation contributions are always welcome assuming they're clear and concise; my vote, feel free to open a pull request if you have documentation you believe would be useful.

tebruno99 commented 1 year ago

Originial Comment: @marti1125

Hi! Could I contribute with it =?

tebruno99 commented 1 year ago

Originial Comment: @marti1125

I am trying to understand subprotocols using client/server example

I just modify https://github.com/gorilla/websocket/blob/master/examples/echo/server.go#L23

c, err := upgrader.Upgrade(w, r, r.Header)

in the terminal show upgrade:websocket: application specific 'Sec-WebSocket-Extensions' headers are unsupported

tebruno99 commented 1 year ago

Orginal Comment: @ghost

@marti1125 It looks like you added a Sec-WebSocket-Extensions header, but that header is unrelated to subprotocols. Did you you intend to add a Sec-Websocket-Protocol instead?