diff options
| author | Marin Ivanov <[email protected]> | 2026-01-16 23:23:02 +0200 |
|---|---|---|
| committer | Marin Ivanov <[email protected]> | 2026-01-16 23:23:02 +0200 |
| commit | 3c64c264897d8f4b2bed21e34a455298ed079e3b (patch) | |
| tree | 6fb1ca62b557684bae42a5288d3892bb3aa1d548 /main.go | |
| parent | a60ea5ac6ef184fbd2fa485e3887e7dcba5b7120 (diff) | |
fix mimetype detection with curl
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |
