feat(sync): use waiting for descriptor fetch

Signed-off-by: Vishwas Rajashekar <dev@vrajashkr.com>
This commit is contained in:
Vishwas Rajashekar
2026-05-20 01:12:09 +05:30
parent d93506909c
commit f7444abbd4
6 changed files with 129 additions and 33 deletions
+3 -2
View File
@@ -1508,9 +1508,10 @@ func (rh *RouteHandler) GetBlob(response http.ResponseWriter, request *http.Requ
return
}
} else {
response.Header().Set("Content-Length", strconv.FormatInt(copier.Source.InFlightReader.GetDescriptor().Size, 10))
desc := copier.Source.Descriptor()
response.Header().Set("Content-Length", strconv.FormatInt(desc.Size, 10))
response.Header().Set(constants.DistContentDigestKey, digest.String())
response.Header().Set("Content-Type", copier.Source.InFlightReader.GetDescriptor().MediaType)
response.Header().Set("Content-Type", desc.MediaType)
response.WriteHeader(http.StatusOK)
clientCopyErr := copier.Copy()