How to have commas in Cookies (HttpWebRequest)?

  • Thread starter Thread starter kingkong88
  • Start date Start date
K

kingkong88

In the Cookie class that is used with the HttpWebRequest class, commas
are not permitted in the Value property of a Cookie object. This looks
like unusually restrictive as I know of many cookies out there that
contain commas (eg Vignette URLs), and most other programming models
allow commas.

Is there a way to overcome this in .NET Framework 1.1?

Thanks.
 
In the Cookie class that is used with the HttpWebRequest class, commas
are not permitted in the Value property of a Cookie object. This looks
like unusually restrictive as I know of many cookies out there that
contain commas (eg Vignette URLs), and most other programming models
allow commas.

Is there a way to overcome this in .NET Framework 1.1?

Thanks.

Have you tried urlencoding the commas?
 
Thanks. But do web servers URLdecode for cookies?

I tried URLencoding it, and the response from the web server remains
URLencoded.
 
On an IIS, I read the posted cookie on the server side and it does come
out URL decoded. Thanks.
 
Back
Top