The Content-Range header length does not match the provided number of bytes. #747
Labels
status:waiting-for-triage
An issue that is yet to be reviewed or assigned
type:bug
A broken experience
Describe the bug
I am trying to upload a large file using the msgraph sdk.
taking examples from this issue and tweaking a bit to fit the updated SDK, still getting the "The Content-Range header length does not match the provided number of bytes" error.
when executing "SendNoContent", I get the error.
Upon investigation and debugging, I found that when the http library that you use is compressing the request body:
`
`
as you can see after the "compressReqBody" function is invoked, it updates the ContentLength header to a new length, but ignores the Content-Range header that is still based on the uncompressed body.
Expected behavior
The SDK should upload the file to the designated path in SharePoint.
How to reproduce
this is the code that I am using:
`
`
SDK Version
1.45.0
Latest version known to work for scenario above?
No response
Known Workarounds
I managed to solve this by compressing the body with the same gzip library and setting the Content-Range header values with the new compressed bytes length.
`
`
Debug output
Click to expand log
```The text was updated successfully, but these errors were encountered: