camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Mueller (JIRA)" <>
Subject [jira] Commented: (CAMEL-1530) Upgrade camel-http to use httpclient 4.0
Date Tue, 22 Dec 2009 10:15:44 GMT


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:

    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);

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

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

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?


> Upgrade camel-http to use httpclient 4.0
> ----------------------------------------
>                 Key: CAMEL-1530
>                 URL:
>             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.

View raw message