Thanks for reply, Oleg.

> This is clearly a bug. I believe it has already been fixed in the SVN
> trunk. Please re-test application with the latest HttpClient snapshot
> and let me know if the problem still persists.

I've upgraded to trunk/SNAPSHOT version of both httpcore and httpclient. The 
problem is still there but behaves differently.

When I am doing the POST, the httpclient gets sometimes locked. You can see 
here the stacktrace of (dead)locked thread.

SocketInputStream.socketRead0(FileDescriptor, byte[], int, int, int) line: not 
available [native method] [local variables unavailable]  
SocketInputStream.read(byte[], int, int) line: 129      
SocketInputBuffer(AbstractSessionInputBuffer).fillBuffer() line: 103    
SocketInputBuffer(AbstractSessionInputBuffer).readLine(CharArrayBuffer) line: 
191       
DefaultResponseParser.parseHead(SessionInputBuffer) line: 82    
DefaultResponseParser(AbstractMessageParser).parse() line: 174  
DefaultClientConnection(AbstractHttpClientConnection).receiveResponseHeader() 
line: 179 
DefaultClientConnection.receiveResponseHeader() line: 235       
BasicPooledConnAdapter(AbstractClientConnAdapter).receiveResponseHeader() line: 
253     
HttpRequestExecutor.doReceiveResponse(HttpRequest, HttpClientConnection, 
HttpContext) line: 279 
HttpRequestExecutor.execute(HttpRequest, HttpClientConnection, HttpContext) 
line: 121   
DefaultClientRequestDirector.execute(HttpHost, HttpRequest, HttpContext) line: 
391      
DefaultHttpClient(AbstractHttpClient).execute(HttpHost, HttpRequest, 
HttpContext) line: 538     
DefaultHttpClient(AbstractHttpClient).execute(HttpUriRequest, HttpContext) 
line: 473    
DefaultHttpClient(AbstractHttpClient).execute(HttpUriRequest) line: 439 
...

I am using httpclient as part of my proxy. I am forwarding post requests like 
that:

// httpclient configuration is shown in my first email
HttpServletRequest request;
final HttpPost postMethod = new HttpPost(url);
postMethod.setEntity(new InputStreamEntity(request.getInputStream(), 
request.getContentLength()));
final HttpResponse response = httpClient.execute(postMethod);


I am using http://www.zdila.sk/post.html for testing (via the proxy using 
httpclient).
What is very interesting is that if open the page and click on submit within 
few seconds, then it works correctly.
But if I wait for cca half minute, then the browser gets stuck.

I can do more test fo you if you tell me what do you need (set to debug level?)?

BR
-- 
Martin Zdila 
CTO

M-Way Solutions Slovakia s.r.o.
Letna 27, 040 01 Kosice
Slovakia

tel:+421-908-363-848
mailto:[EMAIL PROTECTED]
http://www.mwaysolutions.com
xmpp:[EMAIL PROTECTED] (Jabber)
skype:m.zdila

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to