Upgrade to BETA-1 or current CVS snapshot. I suppose you are using on of the ALPHA releases, as since BETA-1 HttpClient never returns 100 (continue) status code to the caller.
http://jakarta.apache.org/commons/httpclient/downloads.html Cheers Oleg -----Original Message----- From: George Gastaldi [mailto:[EMAIL PROTECTED] Sent: Fri 6/27/2003 16:35 To: Commons HttpClient Project (E-mail) Cc: Subject: Continue - 100 Hello Everybody ! I have a problem regarding HTTPClient when I do a POST. In some situations, the code returned is 100 - Continue. What should I do ? I don't know what to do. byte[] message = ...; HttpClient hc = new HttpClient(); PostMethod pm = new PostMethod('"...url... "); hc.getHostConfiguration().setProxy("proxyHost",123); Credentials cr = new UsernamePasswordCredentials("xx","xx"); hc.getState().setProxyCredentials(null,cr); pm.setDoAuthentication(true); pm.setRequestHeader("Cache-Control","no-store"); //HTTP 1.1 pm.setRequestHeader("Pragma","no-cache"); //HTTP 1.0 pm.setRequestHeader("Content-type","text/xml"); pm.setRequestBody(new ByteArrayInputStream(message)); // Must set length to -1 to use Chunked. (BUG when content-length is 0). int len = (message.length == 0) ? -1 : message.length; pm.setRequestContentLength(len); int rc = hc.executeMethod(pm); // The rc == 100 if (rc == 200) { contents = pm.getResponseBody(); }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
