-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Support compression in websockets #611
Comments
I already answered in the stackoverflow question, but I'll copy it here for posterity 😄
Looking at this again, it seems like there is an official RFC 7692, which specifies websocket compression. So, if possible, I think we should actually natively support it directly in k6 so you don't have to rely on slow and external JS libraries like pako. Seems like it would be fairly straightforward, since the library we use for websockets seems to support compression: https://godoc.org/github.com/gorilla/websocket#Dialer.EnableCompression |
I slightly edited the title so we can use this issue for adding native websocket compression support in k6, without the need for external JS libraries. I also reopened the old issue so we can use it for tracking down the likely JS bug in k6, since it would be a good idea to find and fix it regardless of the native compression support. |
Closed by #2162 |
I have used K6 in websocket performance test. While the content from server is compressed, and I got "�0E�e�!�56���j0&��v!�{�:�9�^�" printed in console. I used nodejs code to handle the same message from server. I got the right text.
So my question is how to decode compressed text in K6?
my K6 script is
If I used the following JS script, I got the correct text to inflate it to plain text.
The text was updated successfully, but these errors were encountered: