Maneesh I am currently busy re-writing PutMethod & PostMethod classes. So, please bear with me for a while.
Clearly the method blocks due to incorrect handling of "Expect: 100-Continue" header either by the client, the server or the proxy. Most probably it's HttpClient's fault, and I am working towards fixing it Cheers Oleg -----Original Message----- From: Maneesh Sharma [mailto:[EMAIL PROTECTED]] Sent: Mittwoch, 29. Januar 2003 07:58 To: Adrian Sutton Cc: 'Commons HttpClient Project' Subject: Re: Put -method blocks Hi Adrian Thanks!! Well, I am able to perform the PUT using a browser and the same proxy server!!!. The trace debug that i have for my program is 2003/01/29 12:18:41:904 IST [TRACE] HttpMethod - -enter getContentCharSet( Header contentheader ) 2003/01/29 12:18:41:904 IST [DEBUG] HttpMethod - -Default charset used: ISO-8859-1 2003/01/29 12:18:41:924 IST [TRACE] HttpMethod - -HttpMethodBase.addRequestHeader(Header) 2003/01/29 12:18:41:924 IST [TRACE] HttpMethod - -HttpMethodBase.addRequestHeader(Header) 2003/01/29 12:18:41:924 IST [TRACE] HttpMethod - -HttpMethodBase.addRequestHeader(Header) 2003/01/29 12:18:41:924 IST [TRACE] HttpClient - -enter HttpClient.executeMethod(HttpMethod) 2003/01/29 12:18:41:934 IST [TRACE] HttpClient - -enter HttpClient.executeMethod(HostConfiguration,HttpMethod) 2003/01/29 12:18:41:994 IST [DEBUG] HttpConnection - -HttpConnectionManager.getConnection: creating connection for alto.india.sun.com:8001 via amrita:8000 using protocol: http:80 2003/01/29 12:18:41:994 IST [DEBUG] HttpConnection - -HttpConnection.setSoTimeout(0) 2003/01/29 12:18:41:994 IST [TRACE] HttpConnection - -enter HttpConnection.open() 2003/01/29 12:18:42:114 IST [TRACE] HttpMethod - -enter HttpMethodBase.execute(HttpState, HttpConnection) 2003/01/29 12:18:42:134 IST [TRACE] Authenticator - -enter Authenticator.authenticate(HttpMethod, HttpState) 2003/01/29 12:18:42:134 IST [TRACE] Authenticator - -enter Authenticator.authenticate(HttpMethod, HttpState, Header, String) 2003/01/29 12:18:42:144 IST [TRACE] Authenticator - -enter Authenticator.authenticateProxy(HttpMethod, HttpState) 2003/01/29 12:18:42:154 IST [TRACE] Authenticator - -enter Authenticator.authenticate(HttpMethod, HttpState, Header, String) 2003/01/29 12:18:42:154 IST [DEBUG] HttpMethod - -Execute loop try 1 2003/01/29 12:18:42:154 IST [TRACE] HttpMethod - -enter HttpMethodBase.processRequest(HttpState, HttpConnection) 2003/01/29 12:18:42:154 IST [TRACE] HttpMethod - -Attempt number 1 to write request 2003/01/29 12:18:42:154 IST [TRACE] HttpMethod - -enter HttpMethodBase.writeRequest(HttpState, HttpConnection) 2003/01/29 12:18:42:154 IST [TRACE] HttpMethod - -enter HttpMethodBase.writeRequestLine(HttpState, HttpConnection) 2003/01/29 12:18:42:154 IST [TRACE] HttpMethod - -enter HttpMethodBase.generateRequestLine(HttpConnection, String, String, String, String) 2003/01/29 12:18:42:164 IST [TRACE] HttpConnection - -enter HttpConnection.print(String) 2003/01/29 12:18:42:164 IST [TRACE] HttpConnection - -enter HttpConnection.write(byte[]) 2003/01/29 12:18:42:164 IST [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int) 2003/01/29 12:18:42:164 IST [DEBUG] wire - ->> "PUT http://alto.india.sun.com:8001/ProxyTests/maneesh.html HTTP/1.1" [\r\n] 2003/01/29 12:18:42:174 IST [TRACE] HttpMethod - -enter HttpMethodBase.writeRequestHeaders(HttpState,HttpConnection) 2003/01/29 12:18:42:174 IST [TRACE] PutMethod - -enter PutMethod.addRequestHeaders(HttpState, HttpConnection) 2003/01/29 12:18:42:174 IST [TRACE] HttpMethod - -enter HttpMethodBase.addRequestHeaders(HttpState, HttpConnection) 2003/01/29 12:18:42:174 IST [TRACE] HttpMethod - -enter HttpMethodBase.addUserAgentRequestHeaders(HttpState, HttpConnection) 2003/01/29 12:18:42:174 IST [TRACE] HttpMethod - -enter HttpMethodBase.addHostRequestHeader(HttpState, HttpConnection) 2003/01/29 12:18:42:174 IST [DEBUG] HttpMethod - -Adding Host request header 2003/01/29 12:18:42:174 IST [TRACE] HttpMethod - -enter HttpMethodBase.addCookieRequestHeader(HttpState, HttpConnection) 2003/01/29 12:18:42:204 IST [TRACE] HttpState - -enter HttpState.getCookies() 2003/01/29 12:18:42:204 IST [TRACE] CookieSpec - -enter CookieSpecBase.match(String, int, String, boolean, Cookie[]) 2003/01/29 12:18:42:204 IST [TRACE] HttpMethod - -enter HttpMethodBase.addAuthorizationRequestHeader(HttpState, HttpConnection) 2003/01/29 12:18:42:204 IST [TRACE] HttpMethod - -enter HttpMethodBase.addProxyAuthorizationRequestHeader(HttpState, HttpConnection) 2003/01/29 12:18:42:204 IST [TRACE] HttpMethod - -enter HttpMethodBase.addContentLengthRequestHeader(HttpState, HttpConnection) 2003/01/29 12:18:42:214 IST [TRACE] PutMethod - -enter PutMethod.getRequestContentLength() 2003/01/29 12:18:42:214 IST [TRACE] HttpConnection - -enter HttpConnection.print(String) 2003/01/29 12:18:42:214 IST [TRACE] HttpConnection - -enter HttpConnection.write(byte[]) 2003/01/29 12:18:42:214 IST [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int) 2003/01/29 12:18:42:214 IST [DEBUG] wire - ->> "Content-length: 8" [\r\n] 2003/01/29 12:18:42:214 IST [TRACE] HttpConnection - -enter HttpConnection.print(String) 2003/01/29 12:18:42:214 IST [TRACE] HttpConnection - -enter HttpConnection.write(byte[]) 2003/01/29 12:18:42:214 IST [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int) 2003/01/29 12:18:42:214 IST [DEBUG] wire - ->> "Connection: Close" [\r\n] 2003/01/29 12:18:42:224 IST [TRACE] HttpConnection - -enter HttpConnection.print(String) 2003/01/29 12:18:42:224 IST [TRACE] HttpConnection - -enter HttpConnection.write(byte[]) 2003/01/29 12:18:42:224 IST [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int) 2003/01/29 12:18:42:224 IST [DEBUG] wire - ->> "Host: alto.india.sun.com:8001" [\r\n] 2003/01/29 12:18:42:234 IST [TRACE] HttpConnection - -enter HttpConnection.print(String) 2003/01/29 12:18:42:234 IST [TRACE] HttpConnection - -enter HttpConnection.write(byte[]) 2003/01/29 12:18:42:234 IST [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int) 2003/01/29 12:18:42:234 IST [DEBUG] wire - ->> "User-Agent: Jakarta Commons-HttpClient/2.0M1" [\r\n] 2003/01/29 12:18:42:234 IST [TRACE] HttpConnection - -enter HttpConnection.print(String) 2003/01/29 12:18:42:234 IST [TRACE] HttpConnection - -enter HttpConnection.write(byte[]) 2003/01/29 12:18:42:234 IST [TRACE] HttpConnection - -enter HttpConnection.write(byte[], int, int) 2003/01/29 12:18:42:234 IST [DEBUG] wire - ->> "Expect: 100-Continue" [\r\n] 2003/01/29 12:18:42:234 IST [TRACE] HttpConnection - -enter HttpConnection.writeLine() 2003/01/29 12:18:42:234 IST [DEBUG] wire - ->> [\r\n] 2003/01/29 12:18:42:415 IST [TRACE] PutMethod - -enter PutMethod.writeRequestBody(HttpState, HttpConnection) 2003/01/29 12:18:42:415 IST [TRACE] HttpMethod - -enter HttpMethodBase.readResponse(HttpState, HttpConnection) 2003/01/29 12:18:42:415 IST [TRACE] HttpMethod - -enter HttpMethodBase.readStatusLine(HttpState, HttpConnection) 2003/01/29 12:18:42:425 IST [TRACE] HttpConnection - -enter HttpConnection.readLine() Thats when the program basically hangs!!! I've just taken the latest nightly build (28th jan)..... TIA regds Maneesh. Adrian Sutton wrote: >Off the top of my head I don't know of any problems with PutMethod and proxy >servers so most likely it is an interaction problem between HttpClient and >the proxy, possibly caused by an error in the code setting up and calling >httpclient, possibly caused by an error in the proxy and possibly by a bug >in http client. > >To decide between them all we really need a lot more information. Here's a >few steps that are likely to be useful in tracking down the problem: > >1. Try with a different proxy server (preferably a completely different type >to the one you're currently using). > >2. Take a look at the logging output produced by HttpClient. See >http://jakarta.apache.org/commons/httpclient/logging.html for information on >how to adjust the logging level of HttpClient. Make sure you take a look at >wireLog to see the interaction between HttpClient and the proxy server. > >3. Check to see if a browser can successfully perform the post through a >proxy. > >4. Search bugzilla to make sure that there isn't a known bug about this >already logged there. > >If none of that shows you the answer, send us through all that information >along with the version of HttpClient you're using and a small test case that >highlights the problem and the guru's around here are likely to be able to >help you out. > >Hope that helps, > >Adrian Sutton, Software Engineer >Ephox Corporation >www.ephox.com > > >-----Original Message----- >From: Maneesh Sharma [mailto:[EMAIL PROTECTED]] >Sent: Wednesday, 29 January 2003 4:12 PM >To: [EMAIL PROTECTED] >Subject: Put -method blocks > > >Hi , >When i use the PutMethod, the executeMethod blocks when my HttpClient is >configured to go through a proxy server. It works fine when there isnt >any proxy server. Is this a bug , or something else is wrong? >Thanks >regards >Maneesh. > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: >[EMAIL PROTECTED] >For additional commands, e-mail: >[EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]