Home > Archive > PERL Miscellaneous > September 2006 > cookie problem.
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Oobi Van Doobi 2006-09-28, 7:59 am |
| Could some kind soul advice a little,please.
I have a C++ client, communicating with a perl script over http.
I send a cookie from the script to the client, and naturally want to send it
back to the script to maintain the state.
However, sending the cookie back to the script causes the script to crash.
the script is simple, it accepts parameters from a form in the C++ client,
and prints them back to the client( this part works).
There is conclusively something wrong with the format of the cookie sent
back:
the line of the cookie sent to the script is this:
Cookie:cookiename=cookieval;cookieparam1
...cookieparamn.
is this correct way of sending the cookie?(correct format?)
many thank's for any advice
| |
| Mumia W. (reading news) 2006-09-28, 6:59 pm |
| On 09/28/2006 05:43 AM, Oobi Van Doobi wrote:
> Could some kind soul advice a little,please.
> I have a C++ client, communicating with a perl script over http.
> I send a cookie from the script to the client, and naturally want to send it
> back to the script to maintain the state.
>
> However, sending the cookie back to the script causes the script to crash.
>
> the script is simple, it accepts parameters from a form in the C++ client,
> and prints them back to the client( this part works).
>
> There is conclusively something wrong with the format of the cookie sent
> back:
> the line of the cookie sent to the script is this:
>
> Cookie:cookiename=cookieval;cookieparam1
...cookieparamn.
>
> is this correct way of sending the cookie?(correct format?)
>
> many thank's for any advice
>
<OT>
Here is where cookies are described:
http://www.w3.org/Protocols/rfc2109/rfc2109
E.g.
Cookie: cookie1name="cookie1value"; cookie2name="cookie2value"
Cookie2: $Version=1
FYI:
Download and install the "lynx" web browser; it's very useful for
debugging web pages and scripts. If you enable lynx's "trace" mode, it
outputs into its trace file a verbatim copy of the HTTP request it sends.
--
paduille.4058.mumia.w@earthlink.net
| |
| Oobi Van Doobi 2006-09-28, 6:59 pm |
| Mumia W. (reading news) wrote:
> On 09/28/2006 05:43 AM, Oobi Van Doobi wrote:
>
> <OT>
> Here is where cookies are described:
>
> http://www.w3.org/Protocols/rfc2109/rfc2109
>
> E.g.
> Cookie: cookie1name="cookie1value"; cookie2name="cookie2value"
> Cookie2: $Version=1
>
> FYI:
> Download and install the "lynx" web browser; it's very useful for
> debugging web pages and scripts. If you enable lynx's "trace" mode, it
> outputs into its trace file a verbatim copy of the HTTP request it sends.
>
>
>
ah, solved some while ago, but thank's anyway.
| |
| Brian McCauley 2006-09-28, 6:59 pm |
| Oobi Van Doobi wrote:
[ A question about the HTTP request Cookie header syntax ]
> Cookie:cookiename=cookieval;cookieparam1
...cookieparamn.
>
> is this correct way of sending the cookie?(correct format?)
Dunno. I've go my Perl hat on here.
> many thank's for any advice
http://www.google.com/search?q=http...t+cookie+header
| |
|
|
|
|
|