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

Add permessage-deflate approx max option #120

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

devsnek
Copy link

@devsnek devsnek commented Oct 18, 2021

Adds an approx_max option to control memory usage. This is approx
because zlib:safeInflate chunk sizes are not configurable so the
size won't match up exactly, and we also don't check the final chunk
(again because of the unconfigurable chunk size). This option is
about general memory usage safety rather than enforcing specific
application logic limits.

I'm not sure if I'm missing something but there don't appear to be any tests in this repo... How should one go about testing and verifying a change works?

Adds an `approx_max` option to control memory usage. This is approx
because `zlib:safeInflate` chunk sizes are not configurable so the
size won't match up exactly, and we also don't check the final chunk
(again because of the unconfigurable chunk size). This option is
about general memory usage safety rather than enforcing specific
application logic limits.
@essen
Copy link
Member

essen commented Oct 18, 2021

Tests are in Cowboy's ws_SUITE.

@devsnek
Copy link
Author

devsnek commented Oct 18, 2021

@essen so should i clone cowboy and update the makefile to point to my branch? i've never really worked with erlang directly before 😅

@essen
Copy link
Member

essen commented Oct 18, 2021

You can clone Cowboy, do mkdir deps; cd deps; ln -s /path/to/your/cowlib; cd .. and then go on from there.

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

Successfully merging this pull request may close these issues.

2 participants