title: ASP.NET fails to correctly handle comma delimited cookies
body: <p>According to <a href="http://www.w3.org/Protocols/rfc2109/rfc2109" rel="nofollow noreferrer">the RFC</a>, individual cookies in the "Cookie" HTTP header may be separated by commas as well as by semicolons. However, ASP.NET does not parse the commas case correctly - it does not count comma as a separator, but considers it just part of the value.</p>
  
  <p><strong>For example</strong>
  If a client sends header <code>Cookie: a=b, c=d</code>, then the ASP.NET application will see just one cookie named "a" with value "b, c=d".</p>
  
  <p>As a special case, the same thing happens when the client sends several Cookie headers (one for each cookie) instead of combining all cookies in one header. From HTTP perspective, this is completely valid, and in such case the effective value of the header should be concatenation of the values of all its instances separated by commas.</p>
  
  <p>Does anybody know a workaround (or maybe a fix?) for this? I absolutely need to get this working, because I don't control the client.</p>
  
  <p>P.S. It is ironic that, according to <a href="https://stackoverflow.com/questions/1136405/handling-a-comma-inside-a-cookie-value-using-nets-c-system-net-cookie">this thread</a>, the .NET built-in HTTP client's (aka HttpWebRequest) behavior is just the opposite, and also causes problems. :-)</p>