Hi ! I'm using a code example that was given on this list :
HttpClient client=new HttpClient(); client.startSession("localhost",80, new Credentials("root","root")); client.setDebug(10); MkcolMethod mc=new MkcolMethod(); mc.setPath("/newpath"); client.executeMethod(mc); client.endSession(); The method generated with it is : MKCOL /newpath HTTP/1.1 Content-Length: 0 Host: http://localhost User-Agent: Jakarta HTTP Client/1.0 But I receive the error message : HTTP/1.1 400 Bad Request Date: Wed, 13 Mar 2002 08:09:14 GMT Server: Apache/1.3.20 (Win32) DAV/1.0.3-dev Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=iso-8859-1 And I've just found why ! Because the host should be localhost, and not http://localhost. But the way how the host header is generated depends not on me.. What can I do ?