Ouch! Well, I guess I'm learning!
"Entity enclosing requests cannot be redirected without user intervention" - thrown by HttpClient. It looks as if HttpClient does not allow a client that expects possible redirection to allow for that on a POST. Is this a bug in HttpClient or are we violating some HTTP standard in trying to do this? It appears that HttpClient 3.0.1 deliberately introduced the disallowing of POST to be redirected. I guess this is why you were forced to hack your own redirection in XML-RPC. I will try the other approach you suggested. -----Original Message----- From: COHEN, STEVEN M (ATTSI) Sent: Monday, July 23, 2007 4:06 PM To: [email protected] Subject: RE: [jira] Updated: (XMLRPC-132) Enabling the ability for the xml-rpc client to redirect requests I had thought of doing this, and I think it would probably work, but did you see my earlier email? I question the whole approach of doing redirection in the XMLRPC layer itself, when the HttpClient layer already handles this. This could be turned on simply by something like this (in XmpRpcCommonsTransport - last line of the method is new): protected void initHttpHeaders(XmlRpcRequest pRequest) throws XmlRpcClientException { config = (XmlRpcHttpClientConfig) pRequest.getConfig(); method = new PostMethod(config.getServerURL().toString()); super.initHttpHeaders(pRequest); if (config.getConnectionTimeout() != 0) client.getHttpConnectionManager().getParams().setConnectionTimeout(confi g.getConnectionTimeout()); if (config.getReplyTimeout() != 0) client.getHttpConnectionManager().getParams().setSoTimeout(config.getCon nectionTimeout()); method.getParams().setVersion(HttpVersion.HTTP_1_1); method.setFollowRedirects(true); } You might want a more flexible system that left this optional, but you get the idea. I think that will be a much less problem-prone fix. Does XML-RPC really want to be responsible for something that it HttpClient's responsibility? I will try this and let you know. If this doesn't work the other approach is still available. -----Original Message----- From: Jochen Wiedmann [mailto:[EMAIL PROTECTED] Sent: Monday, July 23, 2007 3:21 PM To: [email protected] Subject: Re: [jira] Updated: (XMLRPC-132) Enabling the ability for the xml-rpc client to redirect requests On 7/23/07, COHEN, STEVEN M (ATTSI) <[EMAIL PROTECTED]> wrote: > The second line of the try block is getting the currentURI as a string, > which judging by the variable's name (charset), and by the documented > meaning of the the third parameter of the URI constructor in the third > line of the catch block, is supposed to represent the name of a charset. I see, sorry. What happens, if you replace String charset = currentUri.getURI(); with String charset = currentUri.getProtocolCharset(); --------------------------------------------------------------------- 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]
