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

Support compressed HTTP request bodies in REST API #3990

Closed
guilload opened this issue Oct 19, 2023 · 10 comments · Fixed by #4506
Closed

Support compressed HTTP request bodies in REST API #3990

guilload opened this issue Oct 19, 2023 · 10 comments · Fixed by #4506
Assignees
Labels
enhancement New feature or request

Comments

@guilload
Copy link
Member

guilload commented Oct 19, 2023

Implementation pointers:

@guilload guilload added enhancement New feature or request good first issue Good for newcomers labels Oct 19, 2023
@etolbakov
Copy link
Contributor

etolbakov commented Oct 19, 2023

Hey Adrien,
I'm interested in looking into it.

Regards, Eugene

@unpervertedkid
Copy link
Contributor

@guilload can i take this up?

@fmassot
Copy link
Contributor

fmassot commented Dec 3, 2023

@unpervertedkid yes, you can!

@fmassot fmassot assigned unpervertedkid and unassigned etolbakov Dec 3, 2023
@etolbakov
Copy link
Contributor

etolbakov commented Dec 3, 2023

@unpervertedkid please have a look at the #4003 comment section. Hopefully, you'll find it useful! 👍

@unpervertedkid
Copy link
Contributor

unpervertedkid commented Dec 3, 2023

@etolbakov Cool lemme pick it up and lemme also take a look at #4003 thanks.

@guilload
Copy link
Member Author

guilload commented Jan 2, 2024

Hello @unpervertedkid,

I saw you opened a PR to add support for decompression directly in warp. Super cool and thank you! I don't know how long it'll take for the review/merge/release process to complete. In the meantime, we could use your warp::Filter in Quickwit directly. The only missing piece is to dynamically decompress the payload depending on the value of the Content-Encoding header (or its absence).

@unpervertedkid
Copy link
Contributor

Sure @guilload . Although I might take a week or two pick it up so in the mean time if anyone is willing to pick it up feel free to go ahead.
Refer to this pr.

@DCjanus
Copy link

DCjanus commented Jan 10, 2024

A malicious user can compose a request using gzip that has a compression ratio > 1000x, meaning a body of 1MB could expand >1GB. When the server processes these requests, it's very likely to saturate the memory capacity and cause an outage.
-- https://medium.com/@abhinav.ittekot/why-http-request-compression-is-almost-never-supported-5de68067b245

Maybe we should be carefully handle this situation.

@fmassot
Copy link
Contributor

fmassot commented Jan 17, 2024

Friendly ping @unpervertedkid

@unpervertedkid
Copy link
Contributor

@fmassot I think you should assign this to someone else.
My bandwidth is currently pretty limited😥.

PSeitz added a commit that referenced this issue Feb 5, 2024
PSeitz added a commit that referenced this issue Feb 5, 2024
PSeitz added a commit that referenced this issue Feb 6, 2024
fulmicoton added a commit that referenced this issue Feb 6, 2024
* support compressed data

closes #3990

* return 415 for unsupported encoding

* manually set headers in test

* return 400 on corrupted data

---------

Co-authored-by: Paul Masurel <paul@quickwit.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants