On Sun, 2008-07-06 at 14:00 -0700, Mike Cumings wrote:
> Oleg,
> 
> Perhaps my last response was a bit misleading.  I'm not dealing exclusively 
> with
> HTTP CONNECTs.  This is a special purpose proxy which must handle multiple
> HTTP methods.  I could use ProxyClient as a special case within the codebase
> but would prefer to be able to leverage HttpClient.executeMethod(...)
> to eliminate
> special handling in the code.  The API suggests that this is possible since
> executeMethod(...)  takes an HttpMethod argument, of which ConnectMethod
> is an extension.  Is this a bad assumption?  If not, what in my code needs to
> change to be able to successfully establish an HTTP CONNECT using
> ConnectMethod via HttpClient? Thanks again for the assistance,
> 

Mike,

I do not think this can be done with HttpClient 3.1. HTTP CONNECT method
has a different semantic than all other methods.  You should consider
building a custom HTTP client using components of HttpClient 4.0. The
4.0 API is significantly more modular and flexible than its predecessor.

Oleg  



> Mike
> 
> On Sat, Jul 5, 2008 at 4:14 PM, Oleg Kalnichevski <[EMAIL PROTECTED]> wrote:
> > On Sat, 2008-07-05 at 12:56 -0700, Mike Cumings wrote:
> >> Hi Oleg,
> >>
> >> I'm well ware of what HTTP CONNECT is used for and how it works.  When I 
> >> added
> >> the explicit protocol selection in the snippet of code previously sent
> >> out, I was
> >> just checking to see if the scheme would e inherited from the host
> >> configuration.
> >> I had meant to cut that code out prior to sending out my email but it
> >> looks like I
> >> had forgotten do do that..
> >>
> >> I'm just trying to get an HTTP CONNECT to work through an upstream proxy
> >> to a site passed to my code in the form of a hostname and port authority
> >> specification.  It seems like it's getting tripped up in httpclient
> >> when the authority
> >> specification is being parsed/interpreted as a URI.
> >>
> >> Thanks in advance,
> >>
> >> Mike
> >>
> >
> > Mike,
> >
> > Why don't you just use ProxyClient for that?
> >
> > http://svn.apache.org/repos/asf/httpcomponents/oac.hc3x/trunk/src/examples/ProxyTunnelDemo.java
> >
> > Oleg
> >
> >
> > ---------------------------------------------------------------------
> > 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]

Reply via email to