Skip to content

Commit

Permalink
[HF] minor be even more explicit on which version has which headers
Browse files Browse the repository at this point in the history
  • Loading branch information
Nealsoni00 committed Jan 15, 2024
1 parent 14c7228 commit a2c4871
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/handler/unrouted_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ func (handler *UnroutedHandler) PostFileV2(w http.ResponseWriter, r *http.Reques
var isComplete bool
if currentUploadDraftInteropVersion == Version4 {
isComplete = r.Header.Get("Upload-Complete") == "?1"
} else {
} else if currentUploadDraftInteropVersion == Version3 {
isComplete = r.Header.Get("Upload-Incomplete") == "?0"
}

Expand Down Expand Up @@ -675,7 +675,7 @@ func (handler *UnroutedHandler) HeadFile(w http.ResponseWriter, r *http.Request)
} else {
resp.Header["Upload-Complete"] = "?0"
}
} else {
} else if currentUploadDraftInteropVersion == Version3 {
if uploadComplete {
// Upload is complete if we know the size and it matches the offset.
resp.Header["Upload-Incomplete"] = "?0"
Expand Down

0 comments on commit a2c4871

Please sign in to comment.