|
Gary Broadbent
gary at plasmaperfect.net
Thu May 25 06:20:45 EDT 2006
Sorry if this is a silly question, but:
I am having some issues trying to retrieve POST data from a form.
If I set the form method to GET, FieldStorage gets populated, but as soon as I
set the method to POST, I dont retrieve and data.
Please refer to the following output:
***** GET method used **********
FieldStorage
= [Field('num', '0'),
Field('search', 'sear'),
Field('company', 'comp'),
Field('location', 'loca')]
the_request
= 'GET /sipnificant/results?num=0&search=sear&company=comp&location=loca
HTTP/1.1'
subprocess_env
= {'DOCUMENT_ROOT': '/home/***/html',
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT': 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',
'HTTP_CONNECTION': 'keep-alive',
'HTTP_COOKIE': 'taskware_lang=en; style=A;
AWSUSER_ID=awsuser_id1143973127792r5484; colour=white',
'HTTP_HOST': 'plasmaperfect.net',
'HTTP_KEEP_ALIVE': '300',
'HTTP_REFERER': 'http://plasmaperfect.net/****/',
'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.1)
Gecko/20060222 Firefox/1.5.0.1',
'PATH': '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/3.4.5',
'QUERY_STRING': 'num=0&search=sear&company=comp&location=loca',
'REMOTE_ADDR': '192.168.0.4',
'REMOTE_PORT': '53695',
'REQUEST_METHOD': 'GET',
'REQUEST_URI': '/****/results?num=0&search=sear&company=comp&location=loca',
'SCRIPT_FILENAME': '/home/***/sipnificant/results',
'SCRIPT_NAME': '/sipnificant/results',
'SERVER_ADDR': '192.168.0.2',
'SERVER_ADMIN': 'hostmaster at plasmaperfect.net',
'SERVER_NAME': 'plasmaperfect.net',
'SERVER_PORT': '80',
'SERVER_PROTOCOL': 'HTTP/1.1',
'SERVER_SIGNATURE': '',
unparsed_uri
= '/sipnificant/results?num=0&search=sear&company=comp&location=loca'
uri
= '/sipnificant/results'
filename
= '/home/***/sipnificant/results'
canonical_filename
= '/home/***/sipnificant/results'
path_info
= ''
args
= 'num=0&search=sear&company=comp&location=loca'
finfo
= None
parsed_uri
= (None,
None,
None,
None,
None,
None,
'/sipnificant/results',
'num=0&search=sear&company=comp&location=loca',
None)
parsed_uri
= (None,
None,
None,
None,
None,
None,
'/sipnificant/results',
'num=0&search=sear&company=comp&location=loca',
None)
***** POST method used **********
FieldStorage
= []
the_request
= 'POST /sipnificant/results HTTP/1.1'
subprocess_env
= {'CONTENT_LENGTH': '44',
'CONTENT_TYPE': 'application/x-www-form-urlencoded',
'DOCUMENT_ROOT': '/home/***/html',
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTP_ACCEPT': 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',
'HTTP_CONNECTION': 'keep-alive',
'HTTP_COOKIE': 'taskware_lang=en; style=A;
AWSUSER_ID=awsuser_id1143973127792r5484; colour=white',
'HTTP_HOST': 'plasmaperfect.net',
'HTTP_KEEP_ALIVE': '300',
'HTTP_REFERER': 'http://plasmaperfect.net/sipnificant/',
'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.1)
Gecko/20060222 Firefox/1.5.0.1',
'PATH': '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/3.4.5',
'QUERY_STRING': '',
'REMOTE_ADDR': '192.168.0.4',
'REMOTE_PORT': '37766',
'REQUEST_METHOD': 'POST',
'REQUEST_URI': '/sipnificant/results',
'SCRIPT_FILENAME': '/home/****/sipnificant/results',
'SCRIPT_NAME': '/sipnificant/results',
'SERVER_ADDR': '192.168.0.2',
'SERVER_ADMIN': 'hostmaster at plasmaperfect.net',
'SERVER_NAME': 'plasmaperfect.net',
'SERVER_PORT': '80',
'SERVER_PROTOCOL': 'HTTP/1.1',
'SERVER_SIGNATURE': '',
'SERVER_SOFTWARE': 'Apache'}
unparsed_uri
= '/sipnificant/results'
uri
= '/sipnificant/results'
args
= None
finfo
= None
parsed_uri
= (None, None, None, None, None, None, '/sipnificant/results', None, None)
parsed_uri
= (None, None, None, None, None, None, '/sipnificant/results', None, None)
Thank you in advance,
Gary Stidston-Broadbent
|