-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] Cannot Add Sec-Websocket-Extensions header field as a client #674
Comments
I assume that the package disallows setting the extension headers because the package must include code specific to any extension. What is the Sec-Websocket-Extensions header that you are trying to set? |
Well that's very limiting then. If the server wants some capabilities to be specified in the extensions, then there is no way I can use the package. |
The Sec-Websocket-Extensions header is used to negotiate protocol-level extensions to the Websocket protocol. If a protocol-level extension can be implemented by the application, then the extension is probably not at the protocol level. What is the Sec-Websocket-Extensions header that you are trying to set? Without a concrete example showing otherwise, I think the code is correct as is. If you are trying to negotiate features between your client application and your server application, then take a look at subprotocols. Unlike extensions, most libraries (including this library and web browsers) offer subprotocol negotiation. Edit: The registered extensions to the protocol are listed here. |
The server needs this to support multiplexing. |
I see. The proposed mux extension can be implemented by an application. The tricky issue is working out how package and application implemented extensions are listed in the extension header. Do you actually have a server that implements the mux proposal? The proposal has been inactive for years. |
Yes, I think just allowing the header to be modified should work, right? The application will then take care of handling the multiplexing, would the package need to do anything different than passing on the received data to the application? |
There are two problems to resolve in this feature request:
This strikes me as the type of issue that will be tagged "waiting on new maintainer". I am not a maintainer of the project. |
May be at a minimum, allow the header to be either used by the application or the package, but not both.....so that whoever decided to use this handles everything within the application and one who wants to use package functionality does not specify the header. |
Just to confirm, are you implementing the client part of the mux spec to work with a server with mux support? I am double checking because the mux extension was abandoned, I am surprised that there are extant implementations of the spec. The extension implemented by the package (per message deflate) cannot be implemented by an application. The all or nothing approach kills support for that extension. |
That's correct, that's what I'm doing. |
I also need this feature. Why can't this library just let me set what I want? |
@bartekpacia I explained in a previous comment why the library cannot just use the header you want. It will be helpful if you explain why you need the feature. More use cases will strengthen the argument for implementing the feature. |
Describe the bug
Get Error : duplicate header not allowed: Sec-Websocket-Extensions
The text was updated successfully, but these errors were encountered: