Skip to content

Commit 2273cc9

Browse files
djw8605bbockelm
authored andcommitted
Remove content length from upload to enable chunked
Removing the content length from a put changes the upload style from full file upload to a chunked encoded upload. A full file upload causes go to read in the entire file in memory while uploading, chunked does not. **NOTE** chunked uploads only work after xrootd has merged and put into production xrootd/xrootd#2102 Corresponds to htcondor/osdf-client#88
1 parent bf26456 commit 2273cc9

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

client/handle_http.go

-1
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,6 @@ func UploadFile(src string, dest *url.URL, token string, namespace namespaces.Na
727727
log.Errorln("Error creating request:", err)
728728
return 0, err
729729
}
730-
request.ContentLength = fileInfo.Size()
731730
// Set the authorization header
732731
request.Header.Set("Authorization", "Bearer "+token)
733732
var lastKnownWritten int64

0 commit comments

Comments
 (0)