Visual Studio and .NET Framework Home
System.Web.HttpValueCollection parsing and ToString not reversible
7/10/2008 2:49:42 PM
User(s) can reproduce this bug
HttpValueCollection.FillFromString(string s, bool urlencoded, Encoding encoding) parsing does not have the reverse behavior of HttpValueCollection.ToString()
.NET Framework 3.5 Service Pack 1 Beta
Windows Server 2008
Operating System Language
Steps to Reproduce
TAP Code (if applicable)
You can indicate your satisfaction with how Microsoft handled this issue by completing this quick
3 question survey
to post a comment.
Please enter a comment.
on 7/15/2009 at 2:50 PM
Thaks Paulo, we have certainly considered this, we are however unable to release a hotfix for this issue in shipping versions of ASP.NET 3.5 SP1 and below at this point.
on 7/7/2009 at 2:49 PM
However, I see this as a bug and would like to see it fixed in previous versions also.
on 7/1/2009 at 10:56 AM
Thanks for the report. And apologies it's taken so long to get back to you on this. You will see this fix starting in ASP.NET 4 Beta 1.
HttpValueCollection.FillFromString() differentiates between null and empty keys. Parsing "value" would generate a null key, while parsing "=value" would generate an empty key. However, HttpValueCollection.ToString() does not differentiate between null and empty keys:
keyPrefix = (!String.IsNullOrEmpty(key)) ? (key + "=") : String.Empty;
The fix wasto insert "=" for empty keys but nothing for null keys, like so:
keyPrefix = (key != null) ? (key + "=") : String.Empty;
on 8/7/2008 at 5:33 PM
on 7/14/2008 at 4:58 PM
on 7/11/2008 at 2:10 AM
Thanks for your feedback. We are escalating this bug to the product unit who works on that specific feature area. The team will review this issue and make a decision on whether they will fix it or not for the next release.
Visual Studio Product Team
to post a workaround.
Please enter a workaround.
© 2014 Microsoft