❔ HttpClient Request headers automatically capitalizing.
How do i stop my HttpClient Header Names from automatically capitalizing? tried TryAddWithoutValidation, still the header names are getting automatically capitalized.
14 Replies
According to RFC 2616 header names are not case-sensitive
So it doesn't matter
in this case, for my purpose, it matters, any help would be appreciated
Why does it matter?
because the server only accepts it in lowercase
The server does not follow the HTTP spec, then, and should be thrown into the trash where it belongs
That's also the official answer to the issue: https://github.com/dotnet/runtime/issues/30819#issuecomment-538548816
Who maintains the server?
it's api of a big company (im not abusing it for harm)
Bad company
wouldn't say that
if they are a bad company they wouldn't have 3.2 billion sales volume
Ok. If you REALLY need to lowercase the headers, the best I can think of is make a man in the middle local tcp server. You intercept http messages and just lowercase the headers
Sadly, that totally screws your network. Is this for work or school?
You could also fork libhttpserver and lowercase the headers
i was thinking of using restsharp, but i don't know if that would fix it
is this big company server anyway?
Unknown User•15mo ago
Message Not Public
Sign In & Join Server To View
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.