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

Testing issue with httpbingo v2.5.0+ #210

Open
staticfloat opened this issue Nov 15, 2022 · 0 comments
Open

Testing issue with httpbingo v2.5.0+ #210

staticfloat opened this issue Nov 15, 2022 · 0 comments

Comments

@staticfloat
Copy link
Member

httpbingo recently updated their behavior to no longer provide the content-length header on their image/jpeg resource. This breaks the tests here.

Here is a minimal example that shows the difference between the live https://httpbingo.org site, and our version, which is locked to an older release:

julia> using Downloads
       url = "https://httpbingo.org/image/jpeg"
       resp = request(url; method="HEAD")
       haskey(Dict(resp.headers), "content-length")
false

julia> using Downloads
       url = "https://httpbingo.julialang.org/image/jpeg"
       resp = request(url; method="HEAD")
       haskey(Dict(resp.headers), "content-length")
true 

Getting a header dump from curl:

$ curl --HEAD https://httpbingo.org/image/jpeg
HTTP/2 200 
access-control-allow-credentials: true
access-control-allow-origin: *
content-type: image/jpeg
date: Tue, 15 Nov 2022 21:22:05 GMT
server: Fly/5f2bf728 (2022-11-11)
via: 2 fly.io
fly-request-id: 01GHYJQBW2TVHEJF1AV19Q8K5W-sea
$ curl --HEAD https://httpbingo.julialang.org/image/jpeg
HTTP/1.1 200 OK
Server: nginx/1.19.8
Date: Tue, 15 Nov 2022 21:22:27 GMT
Content-Type: image/jpeg
Content-Length: 35588
Connection: keep-alive
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *

You can also run the entire test suite against the upstream httpbingo.org server by redefining this variable.

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

1 participant