summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorMarin Ivanov <[email protected]>2026-01-16 23:23:02 +0200
committerMarin Ivanov <[email protected]>2026-01-16 23:23:02 +0200
commit3c64c264897d8f4b2bed21e34a455298ed079e3b (patch)
tree6fb1ca62b557684bae42a5288d3892bb3aa1d548 /main.go
parenta60ea5ac6ef184fbd2fa485e3887e7dcba5b7120 (diff)
fix mimetype detection with curl
Diffstat (limited to 'main.go')
-rw-r--r--main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.go b/main.go
index 89834dd..2c71593 100644
--- a/main.go
+++ b/main.go
@@ -244,7 +244,7 @@ func (s *Server) indexPost(w http.ResponseWriter, r *http.Request) {
var rd io.Reader
mimeType := r.Header.Get("content-type")
ext := ""
- if mimeType == "" {
+ if mimeType == "" || mimeType == "application/x-www-form-urlencoded" {
mimeType, ext, rd, _ = detectMimetype(r.Body)
} else {
mime := mimetype.Lookup(mimeType)