Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: relaxed Content-Type checks for CLI download#189

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fioan89 merged 1 commit intomainfromfix-support-winddows-binary-mime-types
Sep 3, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletionsCHANGELOG.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,7 @@
###Fixed

- NPE during error reporting
- relaxed`Content-Type` checks while downloading the CLI

##0.6.3 - 2025-08-25

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,6 +25,18 @@ import java.util.zip.GZIPInputStream
importkotlin.io.path.name
importkotlin.io.path.notExists

privatevalSUPPORTED_BIN_MIME_TYPES=listOf(
"application/octet-stream",
"application/exe",
"application/dos-exe",
"application/msdos-windows",
"application/x-exe",
"application/x-msdownload",
"application/x-winexe",
"application/x-msdos-program",
"application/x-msdos-executable",
"application/vnd.microsoft.portable-executable"
)
/**
* Handles the download steps of Coder CLI
*/
Expand DownExpand Up@@ -52,7 +64,7 @@ class CoderDownloadService(
returnwhen (response.code()) {
HTTP_OK-> {
val contentType= response.headers()["Content-Type"]?.lowercase()
if (contentType?.startsWith("application/octet-stream")!=true) {
if (contentType!inSUPPORTED_BIN_MIME_TYPES) {
throwResponseException(
"Invalid content type '$contentType' when downloading CLI from$remoteBinaryURL. Expected application/octet-stream.",
response.code()
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp