-
Notifications
You must be signed in to change notification settings - Fork 388
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
KeyError when replaying proxy tunnel captured sessions (broken in #389, v2.0.0) #415
Conversation
Hmm, maybe then it's how pyvmomi is using vcrpy. I'll close this for now since it broke some things. |
aa47f07
to
a4e60d4
Compare
This is ready for consideration. vmware/pyvmomi relies on vcrpy and is currently forced to use 1.x due to the issue introduced in 2.0.0. This resolves that issue. |
@kevin1024 this is a regression from 1.x - is there any possibility you could review and merge this? Thanks. |
@kevin1024 this is a regression from 1.x - is there any possibility you could review and merge this? Thanks. |
@kevin1024 this is a regression from 1.x - is there any possibility you could review and merge this? Thanks. |
Thanks for the poke. I wonder why the tests don’t seem to be running anymore. |
You may need to re-connect Travis CI and AppVeyor. |
FYI tests did run on this when it was first submitted: |
@jeking3 can you please rebase your branch with master in order to run travis CI ? |
All set, passed. |
Next hurdle - I have an upstream change on pyvmomi that depends on this being in a release. It is blocking pyvmomi from moving to v2 of vcrpy. Any idea when the next release will be? See: vmware/pyvmomi#750 |
This would appear as:
Changes were made in #389 to allow for CONNECT (tunneling), and also OPTIONS (with path '*') would also work using the same logic. In these cases, the vcr.Request class will store the URI of the request as the contents of the path verbatim (not a uri).
When the cassette replays, there was code to parse the port which was throwing an uncaught exception. The code used to expect all uri to begin with either 'https' or 'http'. Now if the uri does not start with those, the port remains
None
instead of generating aKeyError
.Added a unit test to prove this as well.
This fixes #414