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 this?
Thanks a lot, yan --------------------------------- Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail.