Return range header for puts
This commit is contained in:
parent
6f19077d2d
commit
7ed4ad326b
|
@ -98,10 +98,14 @@ func putFile(w http.ResponseWriter, r *http.Request, fileId string) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// @TODO: Return X-Missing header
|
setFileRangeHeader(w, fileId)
|
||||||
}
|
}
|
||||||
|
|
||||||
func headFile(w http.ResponseWriter, r *http.Request, fileId string) {
|
func headFile(w http.ResponseWriter, r *http.Request, fileId string) {
|
||||||
|
setFileRangeHeader(w, fileId)
|
||||||
|
}
|
||||||
|
|
||||||
|
func setFileRangeHeader(w http.ResponseWriter, fileId string) {
|
||||||
chunks, err := getReceivedChunks(fileId)
|
chunks, err := getReceivedChunks(fileId)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
reply(w, http.StatusInternalServerError, err.Error())
|
reply(w, http.StatusInternalServerError, err.Error())
|
||||||
|
|
Loading…
Reference in New Issue