You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
new ByteArrayContent(reqBody){Headers={ContentType=new CustomMediaType()}})
What happens is, at the first SyncHeaders call it is copied from request.Content.Headers into the Headers property. This is all still fine.
Then on the second call of SyncHeaders, it copies from Headers back into request.Content through request.SetHeader, which causes it to normalize the header.
The value application/octet-stream;some=b becomes application/octet-stream; some=b, after the second SyncHeaders call.
I understand this might be a slight edge case but as you can see similar issues have been raised with the .NET team. dotnet/runtime#30171
The text was updated successfully, but these errors were encountered:
Note, I am currently using the
master-3.x
branch.Flurl/src/Flurl.Http/FlurlRequest.cs
Lines 165 to 177 in 9b9d899
When you send a HTTP POST request with the following content.
What happens is, at the first
SyncHeaders
call it is copied fromrequest.Content.Headers
into theHeaders
property. This is all still fine.Then on the second call of
SyncHeaders
, it copies fromHeaders
back intorequest.Content
throughrequest.SetHeader
, which causes it to normalize the header.The value
application/octet-stream;some=b
becomesapplication/octet-stream; some=b
, after the secondSyncHeaders
call.I understand this might be a slight edge case but as you can see similar issues have been raised with the .NET team. dotnet/runtime#30171
The text was updated successfully, but these errors were encountered: