*.pl(in server) get http header information(from client) failed

A

Alont

the header Client sent:
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1
1.3); .NET CLR 1.1.4322)
Host: localhost
Content-Length: 52
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: ASPSESSIONIDQGGGGPOC=PPMDJLKAPKGILCKKAFDHCFOM
abc=xxxx&ccc=xxxx

I want get "abc=xxxx&ccc=xxxx" and "Cookie:",the code I wrote:
require HTTP::Headers;
$h = new HTTP::Headers;
$Cookie = $h->header('Cookie');
print $Cookie;
print "I hate you";
print "I love you";

but the result of "print $Cookie;" is empty, where's my fault?
and how to get "abc=xxxx&ccc=xxxx"-------it isn't a pair of value
 
A

Alont

Christian Winter said:
If you are running your perl code as a cgi script, you
should have a look at the CGI module, which gives you
access to POST and GET parameters and header values of
the current request.

Your server-side code would then look like:

thank you so much for your detail reply :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top