Mismatch between request.field() and QUERY_STRING
Oliver Bock <[email protected]> Thu, 24 Mar 2011 11:25:52 +1100
| Newsgroups | gmane.comp.python.webware |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--===============0604750147569141024==
Content-Type: multipart/alternative;
boundary="------------050908030903000904090509"
This is a multi-part message in MIME format.
--------------050908030903000904090509
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
I have had a few requests where the values in request.fields() do not
agree with what is in QUERY_STRING. Below, see that the referrer,
QUERY_STRING and REQUEST_URI all show _id=BK0000000579561338, and yet in
fields we see _id=BK0000000579558176! How can this be? Looking at
HTTPRequest.py I can see that everything comes from requestDict, which I
guess is coming from the adapter (mod_webkit2). Therefore what the
adapter is sending us in requestDict['input'] does not match what we see
in requestDict['environ']. Does it seem that I am thinking in the right
direction? Has anyone else seen anything like this?
Background: I am now using 1.1b, but I have noticed this problem
occasionally over the last few years. It occurred during a period of
reasonably high usage.
CONTENT_LENGTH 83
CONTENT_TYPE application/x-www-form-urlencoded
DOCUMENT_ROOT /var/www/html
GATEWAY_INTERFACE CGI/1.1
HTTP_ACCEPT application/x-ms-application, image/jpeg,
application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap,
application/vnd.ms-excel, application/vnd.ms-powerpoint,
application/msword, */*
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_ACCEPT_LANGUAGE en-AU
HTTP_CONNECTION keep-alive
HTTP_COOKIE _SID_=20110323082132-d9c44042f70ed31c95834939d79eac32
HTTP_PRAGMA no-cache
HTTP_REFERER http://www.X.com/v003/?_s=qf0044&_id=BK0000000579561338
HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1;
WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET
CLR 3.0.30729; Media Center PC 6.0)
HTTP_VIA 1.1 imelprirnweb01.infoplex.int:8080 (IronPort-WSA/7.1.0-307)
HTTP_X_IMFORWARDS 20
PATH /sbin: /usr/sbin: /bin: /usr/bin
PATH_INFO /
PATH_TRANSLATED /var/www/html/
QUERY_STRING _s=qf0044&_id=BK0000000579561338
REMOTE_ADDR 1.1.1.1
REMOTE_PORT 56840
REQUEST_METHOD POST
REQUEST_URI /v003/?_s=qf0044&_id=BK0000000579561338
SCRIPT_FILENAME /var/www/html/v003
SCRIPT_NAME /v003
SCRIPT_URI http://www.X.com/v003/
SCRIPT_URL /v003/
SERVER_ADDR 0.0.0.0
SERVER_ADMIN root@localhost
SERVER_NAME www.X.com
SERVER_PORT 80
SERVER_PROTOCOL HTTP/1.1
SERVER_SIGNATURE <address>Apache Server at www.X.com Port 80</address>
SERVER_SOFTWARE Apache
UNIQUE_ID 16gr3soE47EAAHBSUgsAAAAG
fields
_action_nextQuestion Next >>
_id BK0000000579558176
_s qf0044
_wasQuestion ID10
method 'POST'
pathInfo '/'
pathTranslated '/var/www/html/'
previousURLPaths []
queryString '_s=qf0044&_id=BK0000000579561338'
serverSidePath '/home/timbock/v003/servlets/QuestionPage.py'
servletPath '/v003'
sessionId '200323082132-d9c44042f70ed31c95834939d79eac32'
uri '/v003/?_s=qf0044&_id=BK0000000579561338'
--------------050908030903000904090509
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
I have had a few requests where the values in request.fields() do
not agree with what is in QUERY_STRING. Below, see that the
referrer, QUERY_STRING and REQUEST_URI all show
_id=BK0000000579561338, and yet in fields we see
_id=BK0000000579558176! How can this be? Looking at HTTPRequest.py
I can see that everything comes from requestDict, which I guess is
coming from the adapter (mod_webkit2). Therefore what the adapter
is sending us in requestDict['input'] does not match what we see in
requestDict['environ']. Does it seem that I am thinking in the
right direction? Has anyone else seen anything like this?<br>
<br>
Background: I am now using 1.1b, but I have noticed this problem
occasionally over the last few years. It occurred during a period
of reasonably high usage.<br>
<br>
<table class="NiceTable">
<tbody>
<tr>
<th align="left"><br>
</th>
<td>
<table class="NiceTable">
<tbody>
<tr>
<th align="left">CONTENT_LENGTH</th>
<td>83</td>
</tr>
<tr>
<th align="left">CONTENT_TYPE</th>
<td>application/x-www-form-urlencoded</td>
</tr>
<tr>
<th align="left">DOCUMENT_ROOT</th>
<td>/var/www/html</td>
</tr>
<tr>
<th align="left">GATEWAY_INTERFACE</th>
<td>CGI/1.1</td>
</tr>
<tr>
<th align="left">HTTP_ACCEPT</th>
<td>application/x-ms-application, image/jpeg,
application/xaml+xml, image/gif, image/pjpeg,
application/x-ms-xbap, application/vnd.ms-excel,
application/vnd.ms-powerpoint, application/msword,
*/*</td>
</tr>
<tr>
<th align="left">HTTP_ACCEPT_ENCODING</th>
<td>gzip, deflate</td>
</tr>
<tr>
<th align="left">HTTP_ACCEPT_LANGUAGE</th>
<td>en-AU</td>
</tr>
<tr>
<th align="left">HTTP_CONNECTION</th>
<td>keep-alive</td>
</tr>
<tr>
<th align="left">HTTP_COOKIE</th>
<td>_SID_=20110323082132-d9c44042f70ed31c95834939d79eac32</td>
</tr>
<tr>
<th align="left">HTTP_PRAGMA</th>
<td>no-cache</td>
</tr>
<tr>
<th align="left">HTTP_REFERER</th>
<td><a class="moz-txt-link-freetext" href="http://www.X.com/v003/?_s=qf0044&_id=BK0000000579561338">http://www.X.com/v003/?_s=qf0044&_id=BK0000000579561338</a></td>
</tr>
<tr>
<th align="left">HTTP_USER_AGENT</th>
<td>Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1;
WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET
CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC
6.0)</td>
</tr>
<tr>
<th align="left">HTTP_VIA</th>
<td>1.1 imelprirnweb01.infoplex.int:8080
(IronPort-WSA/7.1.0-307)</td>
</tr>
<tr>
<th align="left">HTTP_X_IMFORWARDS</th>
<td>20</td>
</tr>
<tr>
<th align="left">PATH</th>
<td>/sbin: /usr/sbin: /bin: /usr/bin</td>
</tr>
<tr>
<th align="left">PATH_INFO</th>
<td>/</td>
</tr>
<tr>
<th align="left">PATH_TRANSLATED</th>
<td>/var/www/html/</td>
</tr>
<tr>
<th align="left">QUERY_STRING</th>
<td>_s=qf0044&_id=BK0000000579561338</td>
</tr>
<tr>
<th align="left">REMOTE_ADDR</th>
<td>1.1.1.1</td>
</tr>
<tr>
<th align="left">REMOTE_PORT</th>
<td>56840</td>
</tr>
<tr>
<th align="left">REQUEST_METHOD</th>
<td>POST</td>
</tr>
<tr>
<th align="left">REQUEST_URI</th>
<td>/v003/?_s=qf0044&_id=BK0000000579561338</td>
</tr>
<tr>
<th align="left">SCRIPT_FILENAME</th>
<td>/var/www/html/v003</td>
</tr>
<tr>
<th align="left">SCRIPT_NAME</th>
<td>/v003</td>
</tr>
<tr>
<th align="left">SCRIPT_URI</th>
<td><a class="moz-txt-link-freetext" href="http://www.X.com/v003/">http://www.X.com/v003/</a></td>
</tr>
<tr>
<th align="left">SCRIPT_URL</th>
<td>/v003/</td>
</tr>
<tr>
<th align="left">SERVER_ADDR</th>
<td>0.0.0.0</td>
</tr>
<tr>
<th align="left">SERVER_ADMIN</th>
<td>root@localhost</td>
</tr>
<tr>
<th align="left">SERVER_NAME</th>
<td><a class="moz-txt-link-abbreviated" href="http://www.X.com">www.X.com</a></td>
</tr>
<tr>
<th align="left">SERVER_PORT</th>
<td>80</td>
</tr>
<tr>
<th align="left">SERVER_PROTOCOL</th>
<td>HTTP/1.1</td>
</tr>
<tr>
<th align="left">SERVER_SIGNATURE</th>
<td><address>Apache Server at <a class="moz-txt-link-abbreviated" href="http://www.X.com">www.X.com</a> Port
80</address>
</td>
</tr>
<tr>
<th align="left">SERVER_SOFTWARE</th>
<td>Apache</td>
</tr>
<tr>
<th align="left">UNIQUE_ID</th>
<td>16gr3soE47EAAHBSUgsAAAAG</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<th align="left">fields</th>
<td>
<table class="NiceTable">
<tbody>
<tr>
<th align="left">_action_nextQuestion</th>
<td>Next >></td>
</tr>
<tr>
<th align="left">_id</th>
<td>BK0000000579558176</td>
</tr>
<tr>
<th align="left">_s</th>
<td>qf0044</td>
</tr>
<tr>
<th align="left">_wasQuestion</th>
<td>ID10</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<th align="left">method</th>
<td>'POST'</td>
</tr>
<tr>
<th align="left">pathInfo</th>
<td>'/'</td>
</tr>
<tr>
<th align="left">pathTranslated</th>
<td>'/var/www/html/'</td>
</tr>
<tr>
<th align="left">previousURLPaths</th>
<td>[]</td>
</tr>
<tr>
<th align="left">queryString</th>
<td>'_s=qf0044&_id=BK0000000579561338'</td>
</tr>
<tr>
<th align="left">serverSidePath</th>
<td>'/home/timbock/v003/servlets/QuestionPage.py'</td>
</tr>
<tr>
<th align="left">servletPath</th>
<td>'/v003'</td>
</tr>
<tr>
<th align="left">sessionId</th>
<td>'200323082132-d9c44042f70ed31c95834939d79eac32'</td>
</tr>
<tr>
<th align="left">uri</th>
<td>'/v003/?_s=qf0044&_id=BK0000000579561338'</td>
</tr>
</tbody>
</table>
<br>
</body>
</html>
--------------050908030903000904090509--
--===============0604750147569141024==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
--===============0604750147569141024==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Webware-discuss mailing list
Webware-discuss-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/webware-discuss
--===============0604750147569141024==--