-
Notifications
You must be signed in to change notification settings - Fork 397
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
[>=4.3.1] Chunked uploads are broken with urllib3 v2 #734
Comments
Hi @sathieu, I have not been successful in reproducing this issue yet. Could you provide a minimal reproducer in Python with VCR.py 5.0.0 and chunked transfer that works with urllib3 v2 but not v2? In case the log at https://gitlab.com/gitlabracadabra/gitlabracadabra/-/jobs/4563346377 disappears, I am attaching a full raw copy here: full_job.log |
@hartwork Here is a minimal reproducer: works with |
Hi @sathieu thanks for these files, well done! 🙏 I confirm that this works with urllib3 v1 but not v2. My understanding is that the request matcher that compres request bodies does not consider these arguably equal bodies as equal. Comparision of bodies is done as follows: Lines 51 to 57 in 4f70152
So both sides are transformed before comparison. Which transformer that is is looked up here… Lines 99 to 104 in 4f70152
…and it is fed by this block here: Lines 85 to 92 in 4f70152
Now that we have that: Maybe one way to fix this is to add a new transformer there? I have a demo of something like that on a new branch One more thing: method |
@hartwork Thanks ! Adding a transformer would work, but the question is why the body is unchuncked with the NB: this |
@sathieu thanks for your reply! I have fixed multiple bugs in the demo in branch Regarding the difference, with urllib3 v1 |
…-chunked-requests Fix body matcher for chunked requests (fixes #734)
With vcrpy 5.0.0, when updating urllib3 from
1.26.16
to2.0.3
, chunked uploads are failing.This is because the body appears to vcrpy unchunked:
Notes:
The text was updated successfully, but these errors were encountered: