Skip to content
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

gzipped files aren't stored properly #11

Open
grepsedawk opened this issue Apr 17, 2022 · 4 comments
Open

gzipped files aren't stored properly #11

grepsedawk opened this issue Apr 17, 2022 · 4 comments

Comments

@grepsedawk
Copy link
Contributor

grepsedawk commented Apr 17, 2022

I haven't been able to diagnose quite properly, but if you play this request fresh:
https://www.mountainproject.com/files/mobilePackages/climb/V2-116096758.gz
and then play it through vcr, the bodies do not match

Definitely planning on digging into it at some point! Will try to repro with minimal test with time.

@kalinon
Copy link
Contributor

kalinon commented Apr 21, 2022

Hmmm its probably because we dont store the compressed format, but the uncompressed one.

@kalinon
Copy link
Contributor

kalinon commented Apr 21, 2022

Seems i have a special block here for it:

File.open(cassette_path, "w+") do |f|
io.each_line do |line|
f.puts(line) unless line =~ /Content-Encoding: gzip/
end
end

Dont know why tho.

@kalinon
Copy link
Contributor

kalinon commented Apr 21, 2022

removed this and just put in a straight write call with the IO. Maybe will fix it.

@grepsedawk
Copy link
Contributor Author

Cool, I'll take a look and let you know if this fixes it! Otherwise I should at least be able to provide a public suite with that breakage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants