hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <http-as...@dubioso.net>
Subject Re: [jira] Closed: (HTTPCLIENT-627) overhaul connection manager and associated connection interface
Date Wed, 21 Feb 2007 15:39:57 GMT
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


Mime
View raw message