diff options
author | clsr <clsr@clsr.net> | 2016-06-17 14:06:43 +0200 |
---|---|---|
committer | clsr <clsr@clsr.net> | 2016-06-17 14:06:43 +0200 |
commit | 8e6f1aab4cce360f62e46ba88636e0c1b3fcef8d (patch) | |
tree | e52a9f40861a8471923827f15ed85a61a297be58 /api.go | |
parent | d5bfbdefb1bb56d7062975cd04954aa1ad346018 (diff) | |
download | gomf-8e6f1aab4cce360f62e46ba88636e0c1b3fcef8d.tar.gz gomf-8e6f1aab4cce360f62e46ba88636e0c1b3fcef8d.zip |
Handle HTTP OPTIONS and reject unknown HTTP methods
Diffstat (limited to 'api.go')
-rw-r--r-- | api.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -63,7 +63,7 @@ func handleUpload(w http.ResponseWriter, r *http.Request) { output := r.FormValue("output") resp := response{Files: []result{}} - if r.Method == "GET" && output == "html" { + if r.Method == http.MethodGet && output == "html" { respond(w, output, resp) return } |