Can someone tell me why I get a reader time out when I try to get the body
of a request and that body is empty? Why wouldn't the reader just return
null?
Here is the code that times out:
Public String getBody(HttpServletRequest req)
{
StringBuffer buf = new StringBuffer();
try
{
BufferedReader rdr = req.getReader();
String bufRead = rdr.readLine();
while ( bufRead != null )
{
buf.append(bufRead);
bufRead = rdr.readLine();
}
}
catch ( IOException e )
{
log.error("******* Problem Reading from the buffered reader
*********");
log.error("* Message: " + e.getMessage() );
log.error("**********************************************************");
buf = new StringBuffer();
}
return buf.toString();
}
It takes forever to get this code to return when the body is empty. Does
someone have a better way?
George Smith
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>