You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Roland Weber (JIRA)" <ji...@apache.org> on 2007/02/04 12:38:05 UTC

[jira] Created: (HTTPCLIENT-627) overhaul connection manager and associated connection interface

overhaul connection manager and associated connection interface
---------------------------------------------------------------

                 Key: HTTPCLIENT-627
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-627
             Project: HttpComponents HttpClient
          Issue Type: Improvement
            Reporter: Roland Weber
         Assigned To: Roland Weber
            Priority: Critical
             Fix For: 4.0 Alpha 1


MultiThreadedHttpConnectionManager/HttpHostConnection needs to be overhauled to provide a layer on top of OperatedClientConnection.
Preliminary working names: ThreadSafeClientConnManager/ManagedClientConnection

This implies some work on former HttpMethodDirector and HttpClient to verify completeness of the new connection management API.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


Re: [jira] Closed: (HTTPCLIENT-627) overhaul connection manager and associated connection interface

Posted by Roland Weber <ht...@dubioso.net>.
Hi Mike,

Roland Weber wrote:

> I've checked in a slightly different fix. Scheme has two
> methods to get the port, and I was calling the wrong one.

Actually I was using the host port directly instead of calling
the method in Scheme that resolves the port if necessary.

>> This one failed as the HttpContent doesn't include an entry for
>> HttpExecutionContext.HTTP_TARGET_HOST.

I've fixed DefaultClientRequestDirector and updated the examples.

cheers,
  Roland


---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


Re: [jira] Closed: (HTTPCLIENT-627) overhaul connection manager and associated connection interface

Posted by Michael Becke <mb...@gmail.com>.
> You've noticed the examples?
> http://svn.apache.org/repos/asf/jakarta/httpcomponents/httpclient/trunk/src/examples/org/apache/http/examples/client/
>

Missed the examples.  Guess I should have looked for those first.

> I started coding it yesterday, based on ElementalHttpServer :-)
> It'll be checked in with the first test cases.

Nice, I'll take a look.

Thanks,

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


Re: [jira] Closed: (HTTPCLIENT-627) overhaul connection manager and associated connection interface

Posted by Roland Weber <ht...@dubioso.net>.
Hi Mike,

> Just started to fiddle around with this tonight.  It's pretty much all
> new to me so I don't have too much to add just yet.

Great! Thanks.

> I started by
> trying to do a simple GET.  Here's what I did:
> [...]
> 
> This worked

I guess that somewhere in the framework, HTTP/1.0 was chosen
as the protocol. HTTP/1.1 without a Host header should have
been rejected by the server :-)

You've noticed the examples?
http://svn.apache.org/repos/asf/jakarta/httpcomponents/httpclient/trunk/src/examples/org/apache/http/examples/client/

> except that the default port for HTTP was not used
> correctly.  I make a quick fix to DefaultClientConnectionOperator and
> checked that in.  Hope that's okay.

I've checked in a slightly different fix. Scheme has two
methods to get the port, and I was calling the wrong one.
Thanks for spotting this.

> Next I tried adding:
> 
>        client.getProcessor().addInterceptor(new RequestTargetHost());
> 
> This one failed as the HttpContent doesn't include an entry for
> HttpExecutionContext.HTTP_TARGET_HOST.  I wasn't sure what the plan
> was for managing HttpContext, so I didn't fix this one.

The examples set the target host when creating the request, that's
why I didn't stumble over this one. The request director should put
the target into the context before calling the request executor.

> I will poke around and let you know what else I find.  Overall things
> look pretty good from what I've seen.  One more quick question, is
> there a plan to add a simple HTTP server in HttpClient like we did in
> 3.0 for testing?

I started coding it yesterday, based on ElementalHttpServer :-)
It'll be checked in with the first test cases.

cheers and thanks,
  Roland


---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


Re: [jira] Closed: (HTTPCLIENT-627) overhaul connection manager and associated connection interface

Posted by Michael Becke <mb...@gmail.com>.
Hi Roland,

Just started to fiddle around with this tonight.  It's pretty much all
new to me so I don't have too much to add just yet.  I started by
trying to do a simple GET.  Here's what I did:

        SchemeRegistry schmreg = new SchemeRegistry();
        Scheme http = new Scheme
            ("http", PlainSocketFactory.getSocketFactory(), 80);
        schmreg.register(http);

        DefaultHttpClient client = new DefaultHttpClient(
                new BasicHttpParams(),
                new SimpleClientConnManager(new BasicHttpParams(), schmreg),
                schmreg
                );
        HttpGet get = new HttpGet("/");
        HttpResponse resp = client.execute(new HttpHost("www.google.com"), get);
        System.out.println(resp.getStatusLine().toString());
        resp.getEntity().consumeContent();

This worked except that the default port for HTTP was not used
correctly.  I make a quick fix to DefaultClientConnectionOperator and
checked that in.  Hope that's okay.

Next I tried adding:

        client.getProcessor().addInterceptor(new RequestTargetHost());

This one failed as the HttpContent doesn't include an entry for
HttpExecutionContext.HTTP_TARGET_HOST.  I wasn't sure what the plan
was for managing HttpContext, so I didn't fix this one.

I will poke around and let you know what else I find.  Overall things
look pretty good from what I've seen.  One more quick question, is
there a plan to add a simple HTTP server in HttpClient like we did in
3.0 for testing?

Thanks,

Mike

On 2/20/07, Roland Weber (JIRA) <ji...@apache.org> wrote:
>
>      [ https://issues.apache.org/jira/browse/HTTPCLIENT-627?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Roland Weber closed HTTPCLIENT-627.
> -----------------------------------
>
>     Resolution: Fixed
>
> The API in org.apache.http.conn is ready for review. The connection manager implementations in o.a.h.impl.conn are stuck in transition and need more work. I'll clean up smaller things while writing test cases and leave the  big one (HTTPCLIENT-636) until we've got test coverage.
>
> In org.apache.http[.impl].client are skeletons for HttpClient and HttpRequestDirector. They are good enough to make use of the connection managers and to communicate directly or via tunnelled TLS/SSL through a proxy as long as no authentication is required.
>
> cheers,
>   Roland
>
>
> > overhaul connection manager and associated connection interface
> > ---------------------------------------------------------------
> >
> >                 Key: HTTPCLIENT-627
> >                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-627
> >             Project: HttpComponents HttpClient
> >          Issue Type: Improvement
> >          Components: HttpConn
> >            Reporter: Roland Weber
> >         Assigned To: Roland Weber
> >            Priority: Critical
> >             Fix For: 4.0 Alpha 1
> >
> >
> > MultiThreadedHttpConnectionManager/HttpHostConnection needs to be overhauled to provide a layer on top of OperatedClientConnection.
> > Preliminary working names: ThreadSafeClientConnManager/ManagedClientConnection
> > This implies some work on former HttpMethodDirector and HttpClient to verify completeness of the new connection management API.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


[jira] Closed: (HTTPCLIENT-627) overhaul connection manager and associated connection interface

Posted by "Roland Weber (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-627?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roland Weber closed HTTPCLIENT-627.
-----------------------------------

    Resolution: Fixed

The API in org.apache.http.conn is ready for review. The connection manager implementations in o.a.h.impl.conn are stuck in transition and need more work. I'll clean up smaller things while writing test cases and leave the  big one (HTTPCLIENT-636) until we've got test coverage.

In org.apache.http[.impl].client are skeletons for HttpClient and HttpRequestDirector. They are good enough to make use of the connection managers and to communicate directly or via tunnelled TLS/SSL through a proxy as long as no authentication is required.

cheers,
  Roland


> overhaul connection manager and associated connection interface
> ---------------------------------------------------------------
>
>                 Key: HTTPCLIENT-627
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-627
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpConn
>            Reporter: Roland Weber
>         Assigned To: Roland Weber
>            Priority: Critical
>             Fix For: 4.0 Alpha 1
>
>
> MultiThreadedHttpConnectionManager/HttpHostConnection needs to be overhauled to provide a layer on top of OperatedClientConnection.
> Preliminary working names: ThreadSafeClientConnManager/ManagedClientConnection
> This implies some work on former HttpMethodDirector and HttpClient to verify completeness of the new connection management API.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


[jira] Updated: (HTTPCLIENT-627) overhaul connection manager and associated connection interface

Posted by "Roland Weber (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-627?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roland Weber updated HTTPCLIENT-627:
------------------------------------

    Component/s: HttpConn

> overhaul connection manager and associated connection interface
> ---------------------------------------------------------------
>
>                 Key: HTTPCLIENT-627
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-627
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpConn
>            Reporter: Roland Weber
>         Assigned To: Roland Weber
>            Priority: Critical
>             Fix For: 4.0 Alpha 1
>
>
> MultiThreadedHttpConnectionManager/HttpHostConnection needs to be overhauled to provide a layer on top of OperatedClientConnection.
> Preliminary working names: ThreadSafeClientConnManager/ManagedClientConnection
> This implies some work on former HttpMethodDirector and HttpClient to verify completeness of the new connection management API.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org