[ 
https://issues.apache.org/activemq/browse/CAMEL-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56603#action_56603
 ] 

Christian Mueller commented on CAMEL-1530:
------------------------------------------

Claus, that's what i mean... :-(

In org.apache.http.params.HttpConnectionParams.getSoTimeout(HttpParams), the 
code is the following:

{code}
    public static int getSoTimeout(final HttpParams params) {
        if (params == null) {
            throw new IllegalArgumentException("HTTP parameters may not be 
null");
        }
        return params.getIntParameter(CoreConnectionPNames.SO_TIMEOUT, 0);
    }
{code}

and org.apache.http.params.AbstractHttpParams.getIntParameter(String, int) is 
defined as:

{code}
    public int getIntParameter(final String name, int defaultValue) { 
        Object param = getParameter(name);
        if (param == null) {
            return defaultValue;
        }
        return ((Integer)param).intValue();
    }
{code}

So, if the so_timeout a String, we get a ClassCastException. There is no type 
conversion. I don't know why the way to configure the HttpClient is so 
inconvenient... :-(

Should I continue my work on HttpParamsBuilder or do you have a better idea 
(I'm offline from this evening until 12/28/2009)?

I also have to work on camel-http/camel-jetty, because 17 test fails in 
camel-jetty. All tests in camel-http succeed. If you agree, I will provide some 
more unit tests (may be not a camel route test) in camel-http because I think 
tests in camel-hhtp should fail, if there are issues in camel-http. What do you 
think?

Christian

> Upgrade camel-http to use httpclient 4.0
> ----------------------------------------
>
>                 Key: CAMEL-1530
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1530
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-http
>    Affects Versions: 2.0-M1
>            Reporter: Claus Ibsen
>            Assignee: Christian Mueller
>             Fix For: 2.2.0
>
>
> Upgrading httpclient from 3.1 to 4.0 requires changes in the camel-http code 
> as the API has change quite a lot.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to