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

set maximum header size client will accept #1748

Closed
kahing opened this issue Jan 18, 2019 · 3 comments
Closed

set maximum header size client will accept #1748

kahing opened this issue Jan 18, 2019 · 3 comments
Labels
A-client Area: client. C-feature Category: feature. This is adding a new feature. E-easy Effort: easy. A task that would be a great starting point for a new contributor.

Comments

@kahing
Copy link

kahing commented Jan 18, 2019

all headers are effectively stored in memory (as oppose to body which is streamed) and that's no way to cap how much memory is used. In my case I need to make many concurrent requests to servers I don't control and want to cap the amount of memory used by each request.

@seanmonstar
Copy link
Member

It'd probably be useful if there were more knobs to configure here, but I can at least explain what limits currently exist:

  • There is a maximum number of headers set at 100. This doesn't affect how long each header can be.
  • There's a default max read buffer size set to ~400KB. If the headers haven't finished by that limit, the response will be canceled.
  • There's an option to change the max read buffer size on the Server side, but not the Client. Likely just an oversight.

@kahing
Copy link
Author

kahing commented Jan 18, 2019

a client side configurable max read buffer size sounds exactly what I need

@seanmonstar seanmonstar added A-client Area: client. E-easy Effort: easy. A task that would be a great starting point for a new contributor. C-feature Category: feature. This is adding a new feature. labels Jan 18, 2019
@almielczarek
Copy link
Contributor

I'd like to work on this.

almielczarek added a commit to almielczarek/hyper that referenced this issue Jan 20, 2019
This allows users to configure a limit to client connections' read and
write buffers.

Closes hyperium#1748
almielczarek added a commit to almielczarek/hyper that referenced this issue Jan 24, 2019
This allows users to configure a limit to client connections' read and
write buffers.

Closes hyperium#1748
almielczarek added a commit to almielczarek/hyper that referenced this issue Jan 24, 2019
This allows users to configure a limit to client connections' read and
write buffers.

Closes hyperium#1748
almielczarek added a commit to almielczarek/hyper that referenced this issue Jan 24, 2019
This allows users to configure a limit to client connections' read and
write buffers.

Closes hyperium#1748
seanmonstar pushed a commit that referenced this issue Jan 24, 2019
This allows users to configure a limit to client connections' read and
write buffers.

Closes #1748
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-client Area: client. C-feature Category: feature. This is adding a new feature. E-easy Effort: easy. A task that would be a great starting point for a new contributor.
Projects
None yet
Development

No branches or pull requests

3 participants