microsoft / referencesource

Source from the Microsoft .NET Reference Source that represent a subset of the .NET Framework
https://referencesource.microsoft.com/
MIT License
3.18k stars 1.28k forks source link

Invalid results of the function GetAttributeFromHeader in System.Web.HttpRequest #32

Closed chessar closed 5 years ago

chessar commented 7 years ago

https://github.com/Microsoft/referencesource/blob/455f59f089ff2e96375e800c9b7866446f16cb30/System.Web/HttpRequest.cs#L823

https://github.com/Microsoft/referencesource/blob/master/System/net/System/Net/HttpListenerRequest.cs#L1216

For example, for parameters headerValue = "multipart/form-data; boundary=abc; charset=UTF-8" (from Content-Type header) and attrName = "boundary" The result will be

"abc;"

instead

"abc"

In this case, the Files and Form collections are empty, because boundary value (from GetMultipartBoundary) is not valid.

karelz commented 6 years ago

Please file the issue on VS Developer Community portal: https://github.com/dotnet/corefx#how-to-engage-contribute-and-provide-feedback I assume there are 2 different problems - in HttpListener and in System.Web.HttpRequest. Can you please sketch a repro & impact of each in your report? Note: Unless the impact is high (incl. additional upvotes), it may not meet the bar for a fix in .NET Framework.

We should close the issue here (sadly, I don't have permissions to do that).

chessar commented 6 years ago

Hello, @karelz

Please file the issue on VS Developer Community portal: https://github.com/dotnet/corefx#how-to-engage-contribute-and-provide-feedback

I posted a report on VS Developer Community portal: https://developercommunity.visualstudio.com/content/problem/302929/invalid-results-of-the-function-getattributefromhe.html