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

Commit 78692ce

Browse files
Correct content type header for binary upload mode
1 parent a0af8c8 commit 78692ce

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎main.go‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,12 @@ func main() {
141141
}
142142
os.Exit(1)
143143
}
144-
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
144+
145+
if *binMode {
146+
req.Header.Set("Content-Type", "application/octet-stream")
147+
} else {
148+
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
149+
}
145150

146151
if len(*username) > 0 && len(*password) != 0 {
147152
req.SetBasicAuth(*username, *password)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /