mirror of
https://github.com/project-zot/zot.git
synced 2026-06-15 20:07:55 +08:00
mocked tests for routes
Signed-off-by: laurentiuNiculae <themelopeus@gmail.com>
This commit is contained in:
committed by
Ramkumar Chinchani
parent
287ac05ddc
commit
7d8af50aec
@@ -955,14 +955,6 @@ func (rh *RouteHandler) PatchBlobUpload(response http.ResponseWriter, request *h
|
||||
return
|
||||
}
|
||||
|
||||
contentRange := request.Header.Get("Content-Range")
|
||||
if contentRange == "" {
|
||||
rh.c.Log.Warn().Str("actual", request.Header.Get("Content-Range")).Msg("invalid content range")
|
||||
response.WriteHeader(http.StatusRequestedRangeNotSatisfiable)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
var from, to int64
|
||||
if from, to, err = getContentRange(request); err != nil || (to-from)+1 != contentLength {
|
||||
response.WriteHeader(http.StatusRequestedRangeNotSatisfiable)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user