Files
dotnet-runtime/src/libraries/System.Net.Http/tests
David Shulman 46241bfd10 Fix WinHttpHandler uri escaping for HTTP requests
There is a behavior difference between .NET Framework (Desktop) and
CoreFx. Desktop will send some reserved characters (such as square
brackets) on the wire as-is without any percent-encoding. CoreFx using
WinHttpHandler is doing additional percent-encoding on those characters.

This fix changes WinHttpHandler behavior so that it won't do any additional
percent-encoding. Whatever encoding System.Uri has done will be
transmitted as-is.

There is a separate problem where System.Uri itself doesn't
percent-encode these characters during normalization. That is due to
changes in the .NET Framework 4.5 timeframe (2012) where System.Uri was changed to
follow more IRI (RFC 3987) rules. One could argue that was the real
problem. But since this behavior is already baked into .NET Framework,
the right fix for the below issue is to match Desktop behavior.

We will be having a separate discussion/issue to analyze/debate whether System.Uri
needs to be changed (or not) in the future. The various URI and HTTP RFCs have
ambiguous language in these areas.

Fixes dotnet/corefx#11156


Commit migrated from https://github.com/dotnet/corefx/commit/429dfa4c320830ef3dc2d84f065064cc33239f1d
2016-08-25 14:14:57 -07:00
..
2016-08-22 14:27:27 +00:00