-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavior
Description
Zig Version
0.15.1,0.16.0-dev.252+ae00a2a84
Steps to Reproduce and Observed Behavior
Not sure if this is considered a bug, but ever since the http Api rewrite I cannot download release assets from github using my work laptop and zig fetch
anymore.
zig fetch https://github.com/oven-sh/bun/releases/download/bun-v1.2.22/bun-windows-x64.zip
I guess the redirects in this environment are unusually large as there seems to be a cisco transparent proxy involved.
It looks like after rebuilding zig with a larger http redirect buffer from 1024b to 4096b (and inserting a debug statement), it passes, reaching 3076 bytes:
warning: redirect: new_location.len:912 aux_buf.len:4096
new_location: https://release-assets.githubusercontent.com/github-production-release-asset/357728969/2c913bea-5418-4a5a-a441-93acbe653dc6?sp=r&sv=2018-11-09&sr=b&spr=https&se=2025-09-18T21%3A37%3A21Z&rscd=attachment%3B+filename%3Dbun-linux-x64.zip&rsct=application%2Foctet-stream&skoid=96c2d410-5711-43a1-aedd-ab1947aa7ab0&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skt=2025-09-18T20%3A37%3A09Z&ske=2025-09-18T21%3A37%3A21Z&sks=b&skv=2018-11-09&sig=Ug1vGnnSamuEQmEvCEpkme5XPZFCZPLZq4fdysMpjFs%3D&jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmVsZWFzZS1hc3NldHMuZ2l0aHVidXNlcmNvbnRlbnQuY29tIiwia2V5Ijoia2V5MSIsImV4cCI6MTc1ODIyOTUyMCwibmJmIjoxNzU4MjI5MjIwLCJwYXRoIjoicmVsZWFzZWFzc2V0cHJvZHVjdGlvbi5ibG9iLmNvcmUud2luZG93cy5uZXQifQ.1nqfHvz0IU7Dwc6FO1InSBYxk0yMmx1wM-Q0ZIVQuYg&response-content-disposition=attachment%3B%20filename%3Dbun-linux-x64.zip&response-content-type=application%2Foctet-stream
warning: redirect: new_location.len:1087 aux_buf.len:3184
new_location: https://release-assets.githubusercontent.com.x.3b7f9f4c047ac04abf097800b6c51725b5be.9270fd55.id.opendns.com/s/release-assets.githubusercontent.com/github-production-release-asset/357728969/2c913bea-5418-4a5a-a441-93acbe653dc6?X-OpenDNS-Session=_3b7f9f4c047ac04abf097800b6c51725b5be9270fd55_JKwwQ8Ar_sp=r&sv=2018-11-09&sr=b&spr=https&se=2025-09-18T21%3A37%3A21Z&rscd=attachment%3B+filename%3Dbun-linux-x64.zip&rsct=application%2Foctet-stream&skoid=96c2d410-5711-43a1-aedd-ab1947aa7ab0&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skt=2025-09-18T20%3A37%3A09Z&ske=2025-09-18T21%3A37%3A21Z&sks=b&skv=2018-11-09&sig=Ug1vGnnSamuEQmEvCEpkme5XPZFCZPLZq4fdysMpjFs%3D&jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmVsZWFzZS1hc3NldHMuZ2l0aHVidXNlcmNvbnRlbnQuY29tIiwia2V5Ijoia2V5MSIsImV4cCI6MTc1ODIyOTUyMCwibmJmIjoxNzU4MjI5MjIwLCJwYXRoIjoicmVsZWFzZWFzc2V0cHJvZHVjdGlvbi5ibG9iLmNvcmUud2luZG93cy5uZXQifQ.1nqfHvz0IU7Dwc6FO1InSBYxk0yMmx1wM-Q0ZIVQuYg&response-content-disposition=attachment%3B%20filename%3Dbun-linux-x64.zip&response-content-type=application%2Foctet-stream
warning: redirect: new_location.len:985 aux_buf.len:2097
new_location: https://release-assets.githubusercontent.com/github-production-release-asset/357728969/2c913bea-5418-4a5a-a441-93acbe653dc6?X-OpenDNS-Session=_3b7f9f4c047ac04abf097800b6c51725b5be9270fd55_JKwwQ8Ar_sp=r&sv=2018-11-09&sr=b&spr=https&se=2025-09-18T21%3A37%3A21Z&rscd=attachment%3B+filename%3Dbun-linux-x64.zip&rsct=application%2Foctet-stream&skoid=96c2d410-5711-43a1-aedd-ab1947aa7ab0&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skt=2025-09-18T20%3A37%3A09Z&ske=2025-09-18T21%3A37%3A21Z&sks=b&skv=2018-11-09&sig=Ug1vGnnSamuEQmEvCEpkme5XPZFCZPLZq4fdysMpjFs%3D&jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmVsZWFzZS1hc3NldHMuZ2l0aHVidXNlcmNvbnRlbnQuY29tIiwia2V5Ijoia2V5MSIsImV4cCI6MTc1ODIyOTUyMCwibmJmIjoxNzU4MjI5MjIwLCJwYXRoIjoicmVsZWFzZWFzc2V0cHJvZHVjdGlvbi5ibG9iLmNvcmUud2luZG93cy5uZXQifQ.1nqfHvz0IU7Dwc6FO1InSBYxk0yMmx1wM-Q0ZIVQuYg&response-content-disposition=attachment%3B%20filename%3Dbun-linux-x64.zip&response-content-type=application%2Foctet-stream
On the other hand, any other http client including zig 0.14.1 handles it fine, too. Browsers usually support 3-4 redirects.
Expected Behavior
The fetch completes and unpacks the package
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavior