Skip to content
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

permessage-deflate problem #189

Open
rusproject opened this issue Nov 17, 2023 · 1 comment
Open

permessage-deflate problem #189

rusproject opened this issue Nov 17, 2023 · 1 comment
Labels

Comments

@rusproject
Copy link

rusproject commented Nov 17, 2023

Describe the bug
Hello! I am encountering intermittent encoding issues when the Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits header is included. Occasionally, the messages I receive from one of my partner's WebSocket servers become unreadable unless I remove this header. Unfortunately, the problematic WebSocket server is private, requires authorization, and is not under my ownership, so I cannot provide access or contact the owner for further details. Therefore, a reproducible example is not feasible. However, my main question is: Are there any known limitations in this library when using the permessage-deflate extension? Sometimes (but not always), the received message might appear like this:

$Ƚ�@0��??fCU??7??P??4?��?xw�g<?���d?W?�???!*8�???tF�$8??,;\?&X?<???<??W͇l?�???�21

When the expected message, in this example, must be this:
0{"sid":"4869ff5e9f76408d8dc8ad18637c3294","upgrades":[],"pingTimeout":60000,"pingInterval":25000}

Logs
No logs are available, as the issue is related to the content of the messages, which appear as unreadable characters.

Versions
Textalk/websocket-php version: 1.6.3
PHP version: 7.4.33

With the header:

with-deflate-header

Without the header:

without-deflate-header

@rusproject rusproject added the bug label Nov 17, 2023
@sirn-se
Copy link
Contributor

sirn-se commented Nov 20, 2023

Hi @rusproject,

This repo do not provide support for secondary protocols or extensions internally. If you want to support an extension, you would need to implement it on top of the core functionality provided by this repo.

Please also note that this repo is now maintained as phrity/websocket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants