Skip to content

URI from after_request callback cannot be used to stub identical request later #134

Closed
myronmarston opened this Issue Sep 22, 2011 · 3 comments

2 participants

@myronmarston
Collaborator

I've been trying to figure out the source of this VCR issue.

The URI VCR gets from WebMock's after_request callback cannot be used later to stub the same request (i.e. on a later test run).

I've come up with a gist that demonstrates the issue. The %2B from the original request gets decoded as + in the URI on the request in the after_request callback, and then when I use this exact URI to stub the request later it fails.

@bblimke
Owner
bblimke commented Sep 24, 2011

This is due to addressable being inconsistent in normalizing % expressions. It's different for %20 and different for %2B.
I created an issue in addressable: sporkmonger/addressable#50

@myronmarston
Collaborator
@bblimke bblimke referenced this issue in sporkmonger/addressable Dec 28, 2012
Closed

Inconsistent normalization of % escaping #50

@bblimke
Owner
bblimke commented Mar 6, 2013

It looks like my recent changes fixed this issue too. @myronmarston can you please confirm and close?

@bblimke bblimke closed this Mar 7, 2013
@bblimke bblimke reopened this Mar 7, 2013
@bblimke bblimke closed this Sep 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.