Closed henrik closed 6 years ago
Thank you for reporting! I am almost certain this is related to the new header parsing code we introduced. The line you are referring to does this:
responses = Patron::HeaderParser.parse(header_data_for_multiple_responses)
last_response = responses[-1] # Only use the last response (for proxies and redirects)
It is a bit hard for me to imagine how the responses
can be nil in this case, and I doubt I can reproduce this myself without your help. Can you set up a smaller app that demonstrates the problem? If you don't feel like sharing your cassette that causes it on GH you can pass it directly to me off-band and I will see to it that we rectify it into a test case.
@henrik ?
Hi @julik! Sorry about the delay in replying. Thank you, that makes sense. I emailed you a cassette in case that helps – I'm rather limited for time right now, but I've made a note of this ticket in our codebase and will write again if we come back to this code and make a repro or a PR.
Thanks, I'll play with it and get back to you.
Thanks! I nailed the issue to Webmock doing things to the headers string it should not be doing.
Oh, brilliant! Good job on figuring it out.
After upgrading patron, I got errors in some VCR tests like:
Downgrading fixed them.
I'm on VCR 4.0.0.