hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kalnichevski, Oleg" <oleg.kalnichev...@bearingpoint.com>
Subject RE: Response content length is not known
Date Wed, 18 Aug 2004 09:26:10 GMT

Joseph,

Here's the response sent by the server

<< "HTTP/1.0 200 OK[\r][\n]"
<< "Date: Thu, 19 Aug 2004 02:01:34 GMT[\r][\n]"
<< "Server: Oracle9iAS (9.0.3.0.0) Containers for J2EE[\r][\n]"
<< "Content-Type: text/html[\r][\n]"

As you can see the response does not contain a 'content-length' header which is mandatory
for the 200 (OK) response, hence the warning

<RFC1945>

7.2 Entity Body

...

For response messages, ... [a]ll 1xx (informational), 204 (no content), and 304 (not modified)
responses must not include a body. All other responses must include an entity body or a Content-Length
header field defined with a value of zero (0).

</RFC1945>

I hope this clarifies things a little. As a work-around you may want to set HttpClient's log
verbosity to ERROR. For a real fix do consider reporting this problem to Oracle

Oleg


-----Original Message-----
From: joseph mercado [mailto:qt_j23@yahoo.com]
Sent: Wednesday, August 18, 2004 4:42 AM
To: Commons HttpClient Project
Subject: Re: Response content length is not known


Hi list;
   Thanks to michael i generated the wire log. Here it
is. This is the last page where i posted. I did'nt get
the reponsebody. Can anyone explain it.

2004-08-18 10:06:07,686 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] Should
force-close connection.
2004-08-18 10:06:07,686 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.close()
2004-08-18 10:06:07,686 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.closeSockedAndStreams()
2004-08-18 10:06:07,686 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.releaseConnection()
2004-08-18 10:06:07,686 DEBUG
[org.apache.commons.httpclient.MultiThreadedHttpConnectionManager]
enter
HttpConnectionManager.releaseConnection(HttpConnection)
2004-08-18 10:06:07,686 DEBUG
[org.apache.commons.httpclient.MultiThreadedHttpConnectionManager]
Freeing connection,
hostConfig=HostConfiguration[host=203.215.79.212,
protocol=http:80, port=80]
2004-08-18 10:06:07,686 DEBUG
[org.apache.commons.httpclient.MultiThreadedHttpConnectionManager]
enter
HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
2004-08-18 10:06:07,686 DEBUG
[org.apache.commons.httpclient.MultiThreadedHttpConnectionManager]
Notifying no-one, there are no waiting threads
2004-08-18 10:06:07,686 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] enter
getContentCharSet( Header contentheader )
2004-08-18 10:06:07,686 DEBUG
[org.apache.commons.httpclient.HeaderElement] enter
HeaderElement.parse(String)
2004-08-18 10:06:07,686 DEBUG
[org.apache.commons.httpclient.HeaderElement] enter
HeaderElement.parsePair(char[], int, int)
2004-08-18 10:06:07,686 DEBUG
[org.apache.commons.httpclient.HeaderElement] enter
HeaderElement.parsePair(char[], int, int)
2004-08-18 10:06:07,696 DEBUG
[org.apache.commons.httpclient.methods.GetMethod]
enter GetMethod(String)
2004-08-18 10:06:07,696 DEBUG
[org.apache.commons.httpclient.methods.PostMethod]
enter PostMethod.addParameter(String, String)
2004-08-18 10:06:07,696 DEBUG
[org.apache.commons.httpclient.methods.EntityEnclosingMethod]
enter EntityEnclosingMethod.clearRequestBody()
2004-08-18 10:06:07,696 DEBUG
[org.apache.commons.httpclient.HttpClient] enter
HttpClient.executeMethod(HttpMethod)
2004-08-18 10:06:07,696 DEBUG
[org.apache.commons.httpclient.HttpClient] enter
HttpClient.executeMethod(HostConfiguration,HttpMethod,HttpState)
2004-08-18 10:06:07,696 DEBUG
[org.apache.commons.httpclient.MultiThreadedHttpConnectionManager]
enter
HttpConnectionManager.getConnection(HostConfiguration,
long)
2004-08-18 10:06:07,696 DEBUG
[org.apache.commons.httpclient.MultiThreadedHttpConnectionManager]
HttpConnectionManager.getConnection:  config =
HostConfiguration[host=203.215.79.212,
protocol=http:80, port=80], timeout = 0
2004-08-18 10:06:07,696 DEBUG
[org.apache.commons.httpclient.MultiThreadedHttpConnectionManager]
enter
HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
2004-08-18 10:06:07,696 DEBUG
[org.apache.commons.httpclient.MultiThreadedHttpConnectionManager]
enter
HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
2004-08-18 10:06:07,696 DEBUG
[org.apache.commons.httpclient.MultiThreadedHttpConnectionManager]
Getting free connection,
hostConfig=HostConfiguration[host=203.215.79.212,
protocol=http:80, port=80]
2004-08-18 10:06:07,696 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.open()
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpConnection]
HttpConnection.setSoTimeout(0)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.execute(HttpState, HttpConnection)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] Execute
loop try 1
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.processRequest(HttpState,
HttpConnection)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] Attempt
number 1 to process request
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.writeRequest(HttpState, HttpConnection)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.writeRequestLine(HttpState,
HttpConnection)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.generateRequestLine(HttpConnection,
String, String, String, String)
2004-08-18 10:06:07,706 DEBUG [httpclient.wire.header]
>> "POST /reg-dir/submitApplication.do
HTTP/1.1[\r][\n]"
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.print(String)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.write(byte[])
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.write(byte[], int, int)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.writeRequestHeaders(HttpState,HttpConnection)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.methods.ExpectContinueMethod]
enter
ExpectContinueMethod.addRequestHeaders(HttpState,
HttpConnection)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.addRequestHeaders(HttpState,
HttpConnection)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.addUserAgentRequestHeaders(HttpState,
HttpConnection)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.addHostRequestHeader(HttpState,
HttpConnection)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] Adding
Host request header
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.addCookieRequestHeader(HttpState,
HttpConnection)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpState] enter
HttpState.getCookies()
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.cookie.CookieSpec]
enter CookieSpecBase.match(String, int, String,
boolean, Cookie[])
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.cookie.CookieSpec]
enter CookieSpecBase.match(String, int, String,
boolean, Cookie
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.cookie.CookieSpec]
enter CookieSpecBase.formatCookieHeader(Cookie)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.cookie.CookieSpec]
enter RFC2109Spec.formatCookie(Cookie)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.cookie.CookieSpec]
enter RFC2109Spec.formatCookieAsVer(Cookie)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.addAuthorizationRequestHeader(HttpState,
HttpConnection)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.addProxyAuthorizationRequestHeader(HttpState,
HttpConnection)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.addProxyConnectionHeader(HttpState,
HttpConnection)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.methods.EntityEnclosingMethod]
enter
HttpMethodBase.addContentLengthRequestHeader(HttpState,
HttpConnection)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.methods.EntityEnclosingMethod]
enter EntityEnclosingMethod.getRequestContentLength()
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.methods.PostMethod]
enter PostMethod.hasRequestContent()
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.methods.PostMethod]
enter PostMethod.renerateRequestBody()
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.methods.PostMethod]
enter PostMethod.getParameters()
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] enter
getContentCharSet( Header contentheader )
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] Default
charset used: ISO-8859-1
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpMethodBase]
HttpMethodBase.addRequestHeader(Header)
2004-08-18 10:06:07,706 DEBUG [httpclient.wire.header]
>> "User-Agent: Jakarta
Commons-HttpClient/2.0.1[\r][\n]"
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.print(String)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.write(byte[])
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.write(byte[], int, int)
2004-08-18 10:06:07,706 DEBUG [httpclient.wire.header]
>> "Host: 203.215.79.212[\r][\n]"
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.print(String)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.write(byte[])
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.write(byte[], int, int)
2004-08-18 10:06:07,706 DEBUG [httpclient.wire.header]
>> "Cookie: $Version=0;
JSESSIONID=8296eca743e84578b3d8b461aa38a89aLbtTU_InE;
$Path=/reg-dir[\r][\n]"
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.print(String)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.write(byte[])
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.write(byte[], int, int)
2004-08-18 10:06:07,706 DEBUG [httpclient.wire.header]
>> "Content-Length: 15[\r][\n]"
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.print(String)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.write(byte[])
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.write(byte[], int, int)
2004-08-18 10:06:07,706 DEBUG [httpclient.wire.header]
>> "Content-Type:
application/x-www-form-urlencoded[\r][\n]"
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.print(String)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.write(byte[])
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.write(byte[], int, int)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.writeLine()
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.write(byte[])
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.write(byte[], int, int)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.flushRequestOutputStream()
2004-08-18 10:06:07,706 DEBUG [httpclient.wire.header]
>> "[\r][\n]"
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.methods.EntityEnclosingMethod]
enter
EntityEnclosingMethod.writeRequestBody(HttpState,
HttpConnection)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.methods.PostMethod]
enter PostMethod.hasRequestContent()
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.methods.EntityEnclosingMethod]
enter EntityEnclosingMethod.getRequestContentLength()
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.methods.PostMethod]
enter PostMethod.hasRequestContent()
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.methods.EntityEnclosingMethod]
Using buffered request body
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.getRequestOutputStream()
2004-08-18 10:06:07,706 DEBUG
[httpclient.wire.content] >> "action=finished"
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.methods.EntityEnclosingMethod]
Request body sent
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.flushRequestOutputStream()
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.readResponse(HttpState, HttpConnection)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.readStatusLine(HttpState,
HttpConnection)
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.readLine()
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpParser] enter
HttpParser.readLine()
2004-08-18 10:06:07,706 DEBUG
[org.apache.commons.httpclient.HttpParser] enter
HttpParser.readRawLine()
2004-08-18 10:06:07,726 DEBUG [httpclient.wire.header]
<< "HTTP/1.0 200 OK[\r][\n]"
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.readResponseHeaders(HttpState,HttpConnection)
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.getResponseInputStream()
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.HttpParser] enter
HeaderParser.parseHeaders(HttpConnection, HeaderGroup)
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.HttpParser] enter
HttpParser.readLine()
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.HttpParser] enter
HttpParser.readRawLine()
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.HttpParser] enter
HttpParser.readLine()
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.HttpParser] enter
HttpParser.readRawLine()
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.HttpParser] enter
HttpParser.readLine()
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.HttpParser] enter
HttpParser.readRawLine()
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.HttpParser] enter
HttpParser.readLine()
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.HttpParser] enter
HttpParser.readRawLine()
2004-08-18 10:06:07,726 DEBUG [httpclient.wire.header]
<< "Date: Thu, 19 Aug 2004 02:01:34 GMT[\r][\n]"
2004-08-18 10:06:07,726 DEBUG [httpclient.wire.header]
<< "Server: Oracle9iAS (9.0.3.0.0) Containers for
J2EE[\r][\n]"
2004-08-18 10:06:07,726 DEBUG [httpclient.wire.header]
<< "Content-Type: text/html[\r][\n]"
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.processResponseHeaders(HttpState,
HttpConnection)
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.methods.GetMethod]
enter GetMethod.readResponseBody(HttpState,
HttpConnection)
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.readResponseBody(HttpState,
HttpConnection)
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.readResponseBody(HttpState,
HttpConnection)
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.getResponseInputStream()
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] enter
HttpMethodBase.canResponseHaveBody(int)
2004-08-18 10:06:07,726 WARN
[org.apache.commons.httpclient.HttpMethodBase]
Response content length is not known
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.HttpMethodBase]
Force-close connection: true
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.HttpMethodBase]
Buffering response body
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] Should
force-close connection.
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.close()
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.closeSockedAndStreams()
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.HttpConnection] enter
HttpConnection.releaseConnection()
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.MultiThreadedHttpConnectionManager]
enter
HttpConnectionManager.releaseConnection(HttpConnection)
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.MultiThreadedHttpConnectionManager]
Freeing connection,
hostConfig=HostConfiguration[host=203.215.79.212,
protocol=http:80, port=80]
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.MultiThreadedHttpConnectionManager]
enter
HttpConnectionManager.ConnectionPool.getHostPool(HostConfiguration)
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.MultiThreadedHttpConnectionManager]
Notifying no-one, there are no waiting threads
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] enter
getContentCharSet( Header contentheader )
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.HeaderElement] enter
HeaderElement.parse(String)
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.HeaderElement] enter
HeaderElement.parsePair(char[], int, int)
2004-08-18 10:06:07,726 DEBUG
[org.apache.commons.httpclient.HttpMethodBase] Default
charset used: ISO-8859-1






	
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org


***************************************************************************************************
The information in this email is confidential and may be legally privileged.  Access to this
email by anyone other than the intended addressee is unauthorized.  If you are not the intended
recipient of this message, any review, disclosure, copying, distribution, retention, or any
action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. 
If you are not the intended recipient, please reply to or forward a copy of this message to
the sender and delete the message, any attachments, and any copies thereof from your system.
***************************************************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org


Mime
View raw message