Skip to content

Conversation

fioan89
Copy link
Collaborator

@fioan89 fioan89 commented Aug 12, 2025

Add validation for CLI downloads that ensures the Content-Type header is indicating a binary stream (application/octet-stream), including common variants with parameters. This prevents saving unexpected HTML or other non-binary responses (e.g., from frontend dev servers on :8080) as binaries, improving reliability and providing clearer error feedback.

Add validation for CLI downloads that ensures the Content-Type header
is indicating a binary stream (`application/octet-stream`),
including common variants with parameters. This prevents saving unexpected
HTML or other non-binary responses (e.g., from frontend dev servers on :8080)
as binaries, improving reliability and providing clearer error feedback.
@fioan89
Copy link
Collaborator Author

fioan89 commented Aug 12, 2025

image

I think this provides a better message compared to the previous message which hided the actual issue (html page downloaded into a file with the name of the cli, with the fake cli failing to execute)

which now expect Content-Type to be present on the response
Copy link
Member

@code-asher code-asher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@fioan89 fioan89 merged commit a923f58 into main Aug 14, 2025
6 checks passed
@fioan89 fioan89 deleted the fix-enforce-content-type-when-downloading-cli branch August 14, 2025 19:17
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

Successfully merging this pull request may close these issues.

2 participants