ropensci / vcr

Record and replay HTTP requests
https://docs.ropensci.org/vcr
Other
77 stars 12 forks source link

filter_request_header adds a header #213

Closed maelle closed 3 years ago

maelle commented 3 years ago

See https://github.com/maelle/exemplighratia/pull/2/files

In https://github.com/maelle/exemplighratia/blob/vcrtest/tests/fixtures/gh_api_status.yml there is actually no Authorization header in the HTTP request made, but vcr's filtering adds it. I would have expected vcr to replace the header with the value when the header exists to begin with.

sckott commented 3 years ago

Hmm, not sure off the top. I guess it's a bit of an edge case in that I wouldn't expect a user to filter out a header they think they don't have. But, definitely should be fixed.

maelle commented 3 years ago

Well the configuration is for all tests and you won't have the same headers in all requests so it might actually be quite common?

sckott commented 3 years ago

@maelle fixed now