Update upload.go

This commit is contained in:
ZizzyDizzyMC 2021-02-21 21:40:48 -05:00
parent afbb8abd81
commit baa3c3c1d3
1 changed files with 2 additions and 3 deletions

View File

@ -22,7 +22,6 @@ import (
"github.com/gabriel-vasile/mimetype"
"github.com/zenazn/goji/web"
)
const testHeader string = "test"
var FileTooLargeError = errors.New("File too large.")
var fileBlacklist = map[string]bool{
"favicon.ico": true,
@ -56,7 +55,7 @@ func uploadPostHandler(c web.C, w http.ResponseWriter, r *http.Request) {
badRequestHandler(c, w, r, RespAUTO, "")
return
}
if r.Header.Get("Test-Header") == testHeader {
if r.Header.Get("Test-Header") == "test" {
oopsHandler(c, w, r, RespHTML, "You killed it")
}
@ -126,7 +125,7 @@ func uploadPostHandler(c web.C, w http.ResponseWriter, r *http.Request) {
}
func uploadPutHandler(c web.C, w http.ResponseWriter, r *http.Request) {
if len(r.Header.Get("Test-Header")) == testHeader {
if r.Header.Get("Test-Header" == "test" {
oopsHandler(c, w, r, RespHTML, "You killed it")
}
upReq := UploadRequest{}