Skip to content

Commit

Permalink
also send content length to dataprovider
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
  • Loading branch information
butonic committed Nov 24, 2023
1 parent 25ad42b commit b9e0f3e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/http/services/owncloud/ocdav/put.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,13 @@ func (s *svc) handlePut(ctx context.Context, w http.ResponseWriter, r *http.Requ

httpReq, err := rhttp.NewRequest(ctx, http.MethodPut, ep, r.Body)
if err != nil {
log.Error().Err(err).Msg("error creating new request to data service")
w.WriteHeader(http.StatusInternalServerError)
return
}
Propagator.Inject(ctx, propagation.HeaderCarrier(httpReq.Header))
httpReq.Header.Set(datagateway.TokenTransportHeader, token)
httpReq.ContentLength = r.ContentLength

httpRes, err := s.client.Do(httpReq)
if err != nil {
Expand Down

0 comments on commit b9e0f3e

Please sign in to comment.