Oleg,

Do you remember why this ugly code was introduced?

if (canResponseHaveBody(statusLine.getStatusCode())) {
Header connectionHeader = responseHeaders.getFirstHeader("Connection");
String connectionDirective = null;
if (connectionHeader != null) {
connectionDirective = connectionHeader.getValue();
}
if (!"close".equalsIgnoreCase(connectionDirective)) {
LOG.warn("Response content length is not known");
setConnectionCloseForced(true);
}
result = is;
}


I would rather call shouldCloseConnection and if that returns false we still must check for chunked transfer encoding. If no chunks are used *only then* we need to forcibly close the connection.

Odi

[EMAIL PROTECTED] wrote:

Hi,
up to now I used RC1 without problems. After switching to RC2 I get
thousands of log entries "Response content length is not known" (WARNING).
This log entry seems to be created because the server does not send the http
header "content-length" within the response. But is he obliged to do so? I
think he is not, isn't he?
I switched back to RC1 and do not get any log entries of this type.
But what I think, is: if existence of header content-length is not mandatory
there should only be created a log entry with log level TRACE instead of
WARN, shouldn't it?
Thanks,
Klaus Kopruch


----------------------------
MATERNA GmbH
Klaus Kopruch
Vosskuhle 37
44141 Dortmund
GERMANY
Phone: +49 231 5599-8947
Fax: +49 231 5599-67 8947
+49 231 5599-350
Mobil: +49 173 70 78 207
Web: http://www.annyway.de <http://www.annyway.de/>





-- _________________________________________________________________ NOSE applied intelligence ag

 ortwin glück                      [www]      http://www.nose.ch
 software engineer                 [email] [EMAIL PROTECTED]
 hardturmstrasse 171               [pgp key]          0x81CF3416
 8005 zurich                       [office]      +41-1-277 57 35
 switzerland                       [fax]         +41-1-277 57 12


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



Reply via email to