tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lingyan zhu <>
Subject How to monitor data in a request sent to a Tomcat server?
Date Fri, 22 Sep 2006 23:54:44 GMT
I have a client application that posts the content of a file using HTTP/1.0 POST, to a web
application served on a Tomcat server. The client application generates the appropriate HTTP
POST header, and writes the header, followed by the content of the file, out to the server
using socket.
 There has been a strange intermittent problem, where an extra line feed character ('\n')
was sometimes mysteriously added to the beginning of the posted HTTP content. In another word,
when I call getInputStream() on the request in the servlet's service() method, the first byte
in the stream shows up as linefeed, even though the content of the original file being posted
does not starts with line feed.
 It is unlikely a Tomcat problem, but I want to exclude the possibility that Tomcat is somehow
adding this line feed under special circumstances. Therefore I want to monitor the entire
data stream (including both header and content) that was sent in a request and check whether
the data received by Tomcat already contains this extra line feed.
 Does anyone know how  to do this? Or is it possible that Tomcat could be doing anything like

 Thanks a lot,
Do you Yahoo!?
 Get on board. You're invited to try the new Yahoo! Mail.
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message