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
client.rb - fix request chunked body handling #3338
Conversation
Added links to this PR and the related issue to the new test. |
This appears to fix my issue here: #3362 After applying the patch, I'm able to |
+1 for this patch. This patch fixes large podman images (tested things over ~100MB) which previously were erroring out during chunk uploads with Foreman/Katello. |
bb7a9e3
to
cf03e9b
Compare
I just rebased and added another test that I only tested locally on Ubuntu. Locally, it fails on master, passes with this PR. Of course, just to make things fun, it fails on macOS & Windows (note to self - test all OS's locally). I'll either remove it and save for later, or fix it. Either way, I'll merge this later today... |
…ize_hex Co-authored-by: skliew <skliew@gmail.com>
cf03e9b
to
65e0e82
Compare
Great to see this merge, we'll test it out again as soon as it makes it into a gem. |
Description
In client.rb code for processing chunked request bodies,
chunk.size
was used. This may contain both portions of the body and also hex size data. Hex size data may also contain 'headers'. Useline.size
, as it only contains hex size data.The first commit contains a new test (
test_chunked_body_pause_within_chunk_size_hex
), which fails on master with the below. Note that there are severaltest_chunked_body_pause
tests, this adds another where a pause exists within the hex encoded length of the next chunk. Thanks to @skliew, who opened issue #3337.Closes #3337
Your checklist for this pull request
[ci skip]
to the title of the PR.#issue
" to the PR description or my commit messages.