tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillermo de Jesús HOYOS-RIVERA <gho...@laas.fr>
Subject Interesting problem on doPost in proxy implementation...
Date Mon, 17 Nov 2003 10:51:07 GMT

	Hello all:

		I have an interesting problem. I have implemented a
proxy server using Tomcat 3.3.1a on a RedHat 7.1 computer. Tomcat is
working standalone (e.g. not with Apache).

		The problem comes when treating requests via the doPost
method.

		When I use a Netscape 7.1 client, the request is sent by
the browser in two separate packets: one containing the request itself,
and the other (identified as a Continuation, as indicated by Ethereal)
containing the POST data associated to the request. In this case Tomcat
is unable to retrieve the request data via the getParameterNames() and
getParameterValue(parameter) methods (as shown by the debug information)
however (surprisingly) the request is treated correctly, and I get the
response. You can see the relevant information in SECTION ONE below.

		In the case of Microsoft Internet Explorer 6, the
request and its associated data is sent by the browser to the proxy in
one packet, and the POST data is correctly retrieved by Tomcat via the
getParameterNames() and getParameterValue(parameter) methods, however
(surprisingly also) the request is not successfully treated, and I get
an error message in the browser side.

		I have tried to solve the problem implementing the
service() method, as well by implementing separated doGet() and doPost()
methods, but the behavior keeps exactly the same.

		Has someone of you had some experience on this subject?
Do you know if there is some bug in this version of Tomcat that produces
this behavior?

		Thanks in advance and best regards.

##### START SECTION ONE #####

Frame 142 (609 bytes on wire, 609 bytes captured)
Hypertext Transfer Protocol
    POST /pj.cgi HTTP/1.1\r\n
        Request Method: POST
    Host: www.pagesjaunes.fr\r\n
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4)
Gecko/20030624 Netscape/7.1 (ax)\r\n
    Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plai
n;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1\r\n
    Accept-Language: en-us,en;q=0.5\r\n
    Accept-Encoding: gzip,deflate\r\n
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n
    Keep-Alive: 300\r\n
    Connection: keep-alive\r\n
    Referer: http://www.pagesjaunes.fr/pj.cgi?\r\n
    Cookie: VisitorID=GE-72AC640-3FAA0; e=P5ftrqwWAWsAAFyEkWI\r\n

Frame 144 (422 bytes on wire, 422 bytes captured)
Hypertext Transfer Protocol
    Content-Type: application/x-www-form-urlencoded\r\n
    Content-Length: 296\r\n
    \r\n
    Data (296 bytes)

0000  66 61 69 72 65 3d 64 65 63 6f 64 65 5f 69 6e 70   faire=decode_inp
0010  75 74 5f 69 6d 61 67 65 26 44 45 46 41 55 4c 54   ut_image&DEFAULT
0020  5f 41 43 54 49 4f 4e 3d 6a 66 5f 69 6e 73 63 72   _ACTION=jf_inscr
0030  69 70 74 69 6f 6e 73 5f 72 65 71 26 53 45 53 53   iptions_req&SESS
0040  49 4f 4e 5f 49 44 3d 46 42 2d 37 32 41 44 33 35   ION_ID=FB-72AD35
0050  31 2d 34 37 46 38 43 26 56 49 44 3d 47 45 2d 37   1-47F8C&VID=GE-7
0060  32 41 43 36 34 30 2d 33 46 41 41 30 26 6c 61 6e   2AC640-3FAA0&lan
0070  67 3d 46 52 26 70 61 79 73 3d 46 52 26 73 72 76   g=FR&pays=FR&srv
0080  3d 50 4a 26 54 59 50 45 5f 52 45 43 48 45 52 43   =PJ&TYPE_RECHERC
0090  48 45 3d 5a 5a 5a 26 69 6e 70 75 74 5f 69 6d 61   HE=ZZZ&input_ima
00a0  67 65 3d 26 46 52 4d 5f 41 43 54 49 56 49 54 45   ge=&FRM_ACTIVITE
00b0  3d 26 46 52 4d 5f 4e 4f 4d 3d 6d 61 72 65 63 68   =&FRM_NOM=marech
00c0  61 6c 65 26 46 52 4d 5f 41 44 52 45 53 53 45 3d   ale&FRM_ADRESSE=
00d0  26 46 52 4d 5f 4c 4f 43 41 4c 49 54 45 3d 74 6f   &FRM_LOCALITE=to
00e0  75 6c 6f 75 73 65 26 46 52 4d 5f 44 45 50 41 52   ulouse&FRM_DEPAR
00f0  54 45 4d 45 4e 54 3d 26 4a 46 5f 49 4e 53 43 52   TEMENT=&JF_INSCR
0100  49 50 54 49 4f 4e 53 5f 52 45 51 2e 78 3d 33 37   IPTIONS_REQ.x=37
0110  26 4a 46 5f 49 4e 53 43 52 49 50 54 49 4f 4e 53   &JF_INSCRIPTIONS
0120  5f 52 45 51 2e 79 3d 35                           _REQ.y=5

##### END SECTION ONE #####

###############################################

##### START SECTION TWO #####

Frame 511 (919 bytes on wire, 919 bytes captured)
Hypertext Transfer Protocol
    POST /pj.cgi HTTP/1.1\r\n
        Request Method: POST
    Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-excel, application/vnd.ms-powerpoint,
application/x-shockwave-flash, */*\r\n
    Referer: http://www.pagesjaunes.fr/pj.cgi?\r\n
    Accept-Language: es-mx\r\n
    Content-Type: application/x-www-form-urlencoded\r\n
    Accept-Encoding: gzip, deflate\r\n
    User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET
CLR 1.0.3705)\r\n
    Host: www.pagesjaunes.fr\r\n
    Content-Length: 297\r\n
    Connection: Keep-Alive\r\n
    Cache-Control: no-cache\r\n
    Cookie: VisitorID=FD-72A9E18-3F3B8; e=P5fFH6wWAWoAAB@zffA\r\n
    \r\n
    Data (299 bytes)

0000  00 0d 28 22 71 7f 00 10 dc ea a4 58 08 00 45 00   ..("q......X..E.
0010  03 89 4f 66 40 00 80 06 a6 8d 8c 5d c0 3f c1 fc   ..Of@......].?..
0020  f2 e1 12 cb 00 50 4d c0 59 c3 bd 01 41 d6 50 18   .....PM.Y...A.P.
0030  40 92 d3 30 00 00 50 4f 53 54 20 2f 70 6a 2e 63   @..0..POST /pj.c
0040  67 69 20 48 54 54 50 2f 31 2e 31 0d 0a 41 63 63   gi HTTP/1.1..Acc
0050  65 70 74 3a 20 69 6d 61 67 65 2f 67 69 66 2c 20   ept: image/gif, 
0060  69 6d 61 67 65 2f 78 2d 78 62 69 74 6d 61 70 2c   image/x-xbitmap,
0070  20 69 6d 61 67 65 2f 6a 70 65 67 2c 20 69 6d 61    image/jpeg, ima
0080  67 65 2f 70 6a 70 65 67 2c 20 61 70 70 6c 69 63   ge/pjpeg, applic
0090  61 74 69 6f 6e 2f 76 6e 64 2e 6d 73 2d 65 78 63   ation/vnd.ms-exc
00a0  65 6c 2c 20 61 70 70 6c 69 63 61 74 69 6f 6e 2f   el, application/
00b0  76 6e 64 2e 6d 73 2d 70 6f 77 65 72 70 6f 69 6e   vnd.ms-powerpoin
00c0  74 2c 20 61 70 70 6c 69 63 61 74 69 6f 6e 2f 78   t, application/x
00d0  2d 73 68 6f 63 6b 77 61 76 65 2d 66 6c 61 73 68   -shockwave-flash
00e0  2c 20 2a 2f 2a 0d 0a 52 65 66 65 72 65 72 3a 20   , */*..Referer: 
00f0  68 74 74 70 3a 2f 2f 77 77 77 2e 70 61 67 65 73   http://www.pages
0100  6a 61 75 6e 65 73 2e 66 72 2f 70 6a 2e 63 67 69   jaunes.fr/pj.cgi
0110  3f 0d 0a 41 63 63 65 70 74 2d 4c 61 6e 67 75 61   ?..Accept-Langua
0120  67 65 3a 20 65 73 2d 6d 78 0d 0a 43 6f 6e 74 65   ge: es-mx..Conte
0130  6e 74 2d 54 79 70 65 3a 20 61 70 70 6c 69 63 61   nt-Type: applica
0140  74 69 6f 6e 2f 78 2d 77 77 77 2d 66 6f 72 6d 2d   tion/x-www-form-
0150  75 72 6c 65 6e 63 6f 64 65 64 0d 0a 41 63 63 65   urlencoded..Acce
0160  70 74 2d 45 6e 63 6f 64 69 6e 67 3a 20 67 7a 69   pt-Encoding: gzi
0170  70 2c 20 64 65 66 6c 61 74 65 0d 0a 55 73 65 72   p, deflate..User
0180  2d 41 67 65 6e 74 3a 20 4d 6f 7a 69 6c 6c 61 2f   -Agent: Mozilla/
0190  34 2e 30 20 28 63 6f 6d 70 61 74 69 62 6c 65 3b   4.0 (compatible;
01a0  20 4d 53 49 45 20 36 2e 30 3b 20 57 69 6e 64 6f    MSIE 6.0; Windo
01b0  77 73 20 4e 54 20 35 2e 31 3b 20 2e 4e 45 54 20   ws NT 5.1; .NET 
01c0  43 4c 52 20 31 2e 30 2e 33 37 30 35 29 0d 0a 48   CLR 1.0.3705)..H
01d0  6f 73 74 3a 20 77 77 77 2e 70 61 67 65 73 6a 61   ost: www.pagesja
01e0  75 6e 65 73 2e 66 72 0d 0a 43 6f 6e 74 65 6e 74   unes.fr..Content
01f0  2d 4c 65 6e 67 74 68 3a 20 32 39 37 0d 0a 43 6f   -Length: 297..Co
0200  6e 6e 65 63 74 69 6f 6e 3a 20 4b 65 65 70 2d 41   nnection: Keep-A
0210  6c 69 76 65 0d 0a 43 61 63 68 65 2d 43 6f 6e 74   live..Cache-Cont
0220  72 6f 6c 3a 20 6e 6f 2d 63 61 63 68 65 0d 0a 43   rol: no-cache..C
0230  6f 6f 6b 69 65 3a 20 56 69 73 69 74 6f 72 49 44   ookie: VisitorID
0240  3d 46 44 2d 37 32 41 39 45 31 38 2d 33 46 33 42   =FD-72A9E18-3F3B
0250  38 3b 20 65 3d 50 35 66 46 48 36 77 57 41 57 6f   8; e=P5fFH6wWAWo
0260  41 41 42 40 7a 66 66 41 0d 0a 0d 0a 66 61 69 72   AAB@zffA....fair
0270  65 3d 64 65 63 6f 64 65 5f 69 6e 70 75 74 5f 69   e=decode_input_i
0280  6d 61 67 65 26 44 45 46 41 55 4c 54 5f 41 43 54   mage&DEFAULT_ACT
0290  49 4f 4e 3d 6a 66 5f 69 6e 73 63 72 69 70 74 69   ION=jf_inscripti
02a0  6f 6e 73 5f 72 65 71 26 53 45 53 53 49 4f 4e 5f   ons_req&SESSION_

##### END SECTION TWO #####

----------
Guillermo de Jesús HOYOS-RIVERA
Doctorant du LAAS-CNRS, groupe OLC
7, Avenue Colonel Roche, bureau A43
31077, Toulouse, FRANCE
Tel. (+33|0) 5 61 33 62 63
Fax. (+33|0) 5 61 33 64 11 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message