Skip to content

Commit

Permalink
Remove content length from upload to enable chunked
Browse files Browse the repository at this point in the history
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
  • Loading branch information
djw8605 committed Oct 10, 2023
1 parent e5a6f00 commit a660a4f
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion client/handle_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,6 @@ func UploadFile(src string, dest *url.URL, token string, namespace namespaces.Na
log.Errorln("Error creating request:", err)
return 0, err
}
request.ContentLength = fileInfo.Size()
// Set the authorization header
request.Header.Set("Authorization", "Bearer "+token)
var lastKnownWritten int64
Expand Down

0 comments on commit a660a4f

Please sign in to comment.