Hi,

I'm facing a problem with Tomcat 5 (I believe this also happens with older versions) that is described below.

I have developed a servlet for receiving a POST request and processing the data on it and it works fine. Meanwhile, a client application is sending the following request:

-[obtained from tcpdump: some private information was replaced]-----
POST /Notify?id=xpto HTTP/1.1.
Host: 192.168.1.1.
Pragma: no-cache.
accept:text/css,application/vnd.wap.wmlscriptc,application/vnd.wap.wbxml,
accept-charset:ISO-8859-1,UTF-8;Q=0.8,ISO-10646-UCS-2;Q=0.6,US-ASCII;Q=0.7,*;q=0.001.
user-agent: Nokia3200/1.0 () Profile/MIDP-1.0 Configuration/CLDC-1.0.
x-wap.tod-coded: Thu, 01 Jan 1970 00:00:00 GMT.
opt: "http://www.w3.org/1999/06/24-CCPPexchange"; ; ns=13.
13-profile: "http://nds1.nds.nokia.com/uaprof/N3200r100.xml";.
accept-encoding:*;q=0.001.
Accept: text/vnd.wap.wml.
Accept: text/vnd.wap.wmlscript.
Content-Length: 11.
Content-Type: application/x-www-form-urlencoded.
.
900 Success
--------------------------------------

This servlet is working properly with several client application, however for this specific one, it doesn't work as I would like.

What I notice:
1. It works when the content-type of request is something like "*/*"
2. It *doesn't work* when the content-type of request is "application/x-www-form-urlencoded" (see example above).


The servlet is getting the inputstream from the HttpServletRequest and reading data from it.

When it works, I'm able to read the "900 Success" message.

With the example descrived above, there is no data (0 bytes) available from the inputstream. Therefore, I'm unable to read the message.

Is this POST request a non-HTTP standard and therefore Tomcat is not giving such data information to the upper layer (servlet) ?

How can I solve this ?

Thanks in advance.

Best regards,
  Nuno Carvalho


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to