woonie 0 Newbie Poster

Hi,

I've a CGI form script. I'm testing it to see if it's possible to grab the headers sent by the client's computer when the form is submitted. Here's my code:

# start code

import httplib
conn = httplib.HTTPConnection("www.somesite.org")
conn.request("POST", "/scripts/test.py")
r1 = conn.getresponse()
header = r1.getheader('user_header')
conn.close

print header

# end code

"header" is not set and has the value 'None'.

Could someone enlighten me?

Thanks in advance :)

Sean

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.