Update upload.go
This commit is contained in:
parent
6d818c543d
commit
74d3a42eff
10
upload.go
10
upload.go
|
@ -55,10 +55,6 @@ func uploadPostHandler(c web.C, w http.ResponseWriter, r *http.Request) {
|
||||||
badRequestHandler(c, w, r, RespAUTO, "")
|
badRequestHandler(c, w, r, RespAUTO, "")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if r.Header.Get("Test-Header") == "test" {
|
|
||||||
oopsHandler(c, w, r, RespHTML, "You killed it")
|
|
||||||
}
|
|
||||||
|
|
||||||
upReq := UploadRequest{}
|
upReq := UploadRequest{}
|
||||||
uploadHeaderProcess(r, &upReq)
|
uploadHeaderProcess(r, &upReq)
|
||||||
|
|
||||||
|
@ -125,9 +121,6 @@ func uploadPostHandler(c web.C, w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func uploadPutHandler(c web.C, w http.ResponseWriter, r *http.Request) {
|
func uploadPutHandler(c web.C, w http.ResponseWriter, r *http.Request) {
|
||||||
if r.Header.Get("Test-Header") == "test" {
|
|
||||||
oopsHandler(c, w, r, RespHTML, "You killed it")
|
|
||||||
}
|
|
||||||
upReq := UploadRequest{}
|
upReq := UploadRequest{}
|
||||||
uploadHeaderProcess(r, &upReq)
|
uploadHeaderProcess(r, &upReq)
|
||||||
|
|
||||||
|
@ -236,9 +229,6 @@ func uploadHeaderProcess(r *http.Request, upReq *UploadRequest) {
|
||||||
if r.Header.Get("Linx-Randomize") == "yes" {
|
if r.Header.Get("Linx-Randomize") == "yes" {
|
||||||
upReq.randomBarename = true
|
upReq.randomBarename = true
|
||||||
}
|
}
|
||||||
if r.Header.Get("Test-Header") == "test" {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
upReq.deleteKey = r.Header.Get("Linx-Delete-Key")
|
upReq.deleteKey = r.Header.Get("Linx-Delete-Key")
|
||||||
upReq.accessKey = r.Header.Get(accessKeyHeaderName)
|
upReq.accessKey = r.Header.Get(accessKeyHeaderName)
|
||||||
// Get seconds until expiry. Non-integer responses never expire.
|
// Get seconds until expiry. Non-integer responses never expire.
|
||||||
|
|
Loading…
Reference in New Issue