Oleg Kalnichevski wrote:
On Tue, 2011-01-04 at 19:32 +0100, Oleg Kalnichevski wrote:
In which case HttpClent would use chunk coding to signal the end of the message
body. That means there would be at least a closing tag.
I don't know HttpClient like you, but once I put some content in the
file everything works.
Please produce wire log of the HTTP session that exhibits the problem.
http://hc.apache.org/httpcomponents-client-ga/logging.html
Oleg
I tried to simulate the problem with HttpClient 4.0.3 and Tomcat 6.0.26
by posting an empty file with 'expect: 100-continue' handshake. For me
things work as advertised.
[DEBUG] SingleClientConnManager - Get connection for route
HttpRoute[{}->http://localhost:8080]
[DEBUG] RequestAddCookies - CookieSpec selected: best-match
[DEBUG] DefaultHttpClient - Attempt 1 to execute request
[DEBUG] DefaultClientConnection - Sending request:
POST /examples/servlets/servlet/RequestInfoExample HTTP/1.1
[DEBUG] wire ->> "POST /examples/servlets/servlet/RequestInfoExample
HTTP/1.1[EOL]"
[DEBUG] wire ->> "Transfer-Encoding: chunked[EOL]"
[DEBUG] wire ->> "Content-Type: binary/octet-stream[EOL]"
[DEBUG] wire ->> "Host: localhost:8080[EOL]"
[DEBUG] wire ->> "Connection: Keep-Alive[EOL]"
[DEBUG] wire ->> "User-Agent: Apache-HttpClient/4.0.3 (java 1.5)[EOL]"
[DEBUG] wire ->> "Expect: 100-Continue[EOL]"
[DEBUG] wire ->> "[EOL]"
[DEBUG] wire -<< "HTTP/1.1 100 Continue[EOL]"
[DEBUG] wire -<< "[EOL]"
[DEBUG] DefaultClientConnection - Receiving response: HTTP/1.1 100
Continue
[DEBUG] wire ->> "0[EOL]"
[DEBUG] wire ->> "[EOL]"
[DEBUG] wire -<< "HTTP/1.1 200 OK[EOL]"
[DEBUG] wire -<< "Server: Apache-Coyote/1.1[EOL]"
[DEBUG] wire -<< "Content-Type: text/html[EOL]"
[DEBUG] wire -<< "Content-Length: 690[EOL]"
[DEBUG] wire -<< "Date: Tue, 04 Jan 2011 19:23:50 GMT[EOL]"
[DEBUG] wire -<< "[EOL]"
[DEBUG] DefaultClientConnection - Receiving response: HTTP/1.1 200 OK
[DEBUG] DefaultHttpClient - Connection can be kept alive indefinitely
[DEBUG] wire -<< "<html>[\r][\n]"
[DEBUG] wire -<< "<body>[\r][\n]"
[DEBUG] wire -<< "<head>[\r][\n]"
[DEBUG] wire -<< "<title>Request Information Example</title>[\r][\n]"
[DEBUG] wire -<< "</head>[\r][\n]"
[DEBUG] wire -<< "<body bgcolor="white">[\r][\n]"
[DEBUG] wire -<< "<a href="../reqinfo.html">[\r][\n]"
[DEBUG] wire -<< "<img src="../images/code.gif" height=24 width=24
align=right border=0 alt="view code"></a>[\r][\n]"
[DEBUG] wire -<< "<a href="../index.html">[\r][\n]"
[DEBUG] wire -<< "<img src="../images/return.gif" height=24 width=24
align=right border=0 alt="return"></a>[\r][\n]"
[DEBUG] wire -<< "<h3>Request Information Example</h3>[\r][\n]"
[DEBUG] wire -<< "<table border=0><tr><td>[\r][\n]"
[DEBUG] wire -<< "Method:[\r][\n]"
[DEBUG] wire -<< "</td><td>[\r][\n]"
[DEBUG] wire -<< "POST[\r][\n]"
[DEBUG] wire -<< "</td></tr><tr><td>[\r][\n]"
[DEBUG] wire -<< "Request URI:[\r][\n]"
[DEBUG] wire -<< "</td><td>[\r][\n]"
[DEBUG] wire -<<
"/examples/servlets/servlet/RequestInfoExample[\r][\n]"
[DEBUG] wire -<< "</td></tr><tr><td>[\r][\n]"
[DEBUG] wire -<< "Protocol:[\r][\n]"
[DEBUG] wire -<< "</td><td>[\r][\n]"
[DEBUG] wire -<< "HTTP/1.1[\r][\n]"
[DEBUG] wire -<< "</td></tr><tr><td>[\r][\n]"
[DEBUG] wire -<< "Path Info:[\r][\n]"
[DEBUG] wire -<< "</td><td>[\r][\n]"
[DEBUG] wire -<< "null[\r][\n]"
[DEBUG] wire -<< "</td></tr><tr><td>[\r][\n]"
[DEBUG] wire -<< "Remote Address:[\r][\n]"
[DEBUG] wire -<< "</td><td>[\r][\n]"
[DEBUG] wire -<< "127.0.0.1[\r][\n]"
[DEBUG] wire -<< "</table>[\r][\n]"
[DEBUG] SingleClientConnManager - Releasing connection
org.apache.http.impl.conn.singleclientconnmanager$connadap...@a20892
[DEBUG] DefaultClientConnection - Connection shut down
I'm working with Jetty (embedded)
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org