Home All Groups Group Topic Archive Search About

How to have commas in Cookies (HttpWebRequest)?

Author
2 Nov 2005 3:03 PM
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.

Author
2 Nov 2005 10:24 PM
Rob Schieber
kingkon***@gmail.com wrote:
> 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?

--
Rob Schieber
Author
3 Nov 2005 1:28 AM
kingkong88
Thanks.  But do web servers URLdecode for cookies?

I tried URLencoding it, and the response from the web server remains
URLencoded.
Author
3 Nov 2005 2:00 AM
kingkong88
On an IIS, I read the posted cookie on the server side and it does come
out URL decoded.  Thanks.

AddThis Social Bookmark Button