Jandalf > 1) PostMethod.generateRequestBody() > This method just url encodes the parameters. In the 5000 lines of URI > handling code, isn't there a method that url encodes an array of name > value pairs? (I looked, but couldn't find one) >
There are tons of REALLY bizarre stuff in URIUtils (like those toUsingCharset methods) but nothing of a like of a method encode to encode name/value pairs. I have almost started moving code of PostMethod.generateRequestBody(NameValuePair[]) to URIUtils class, but there's one point that made me reconsider. Currently URIUtils does not know any HttpClient specific classes and that sort of makes sense. I am not sure if we should make URIUtils be tightly coupled with NameValuePair class I have to say I know little about URI classes. So, I leave this decision to Sung-Gu > 2) EntityEnclosingMethod > There is a useExpectHeader variable, with a setter and a getter, but it > is not used for anything. Odi once expressed an opinion that there should be an option to disable sending of "Expect: 100-continue" header. In that vein addRequestHeaders method add the header only in case of useExpectHeader variable being true protected void addRequestHeaders(HttpState state, HttpConnection conn) throws IOException, HttpException { ... super.addRequestHeaders(state, conn); ... if (isHttp11() && getUseExpectHeader() && (this.requestBodyStream != null)) { if (getRequestHeader("Expect") == null) { setRequestHeader("Expect", "100-continue"); } } } All the changes you have made look fine to me. I only regret that you had to go through this laborious process for me. I have to say I have rather non-conventional coding style. I like tons of blanks everywhere. I like curly braces on a separate line. I am always in pains when I program for HttpClient as I have to adapt my coding style. Sometimes style violations do slip into my code void doStuff( String param1, int param2 ) { try { } catch( Exception e ) { } } Enjoy your weekend Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]