Skip to content

Commit a660a4f

Browse files
committed
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 e5a6f00 commit a660a4f

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
@@ -700,7 +700,6 @@ func UploadFile(src string, dest *url.URL, token string, namespace namespaces.Na
700700
log.Errorln("Error creating request:", err)
701701
return 0, err
702702
}
703-
request.ContentLength = fileInfo.Size()
704703
// Set the authorization header
705704
request.Header.Set("Authorization", "Bearer "+token)
706705
var lastKnownWritten int64

0 commit comments

Comments
 (0)