launchpad proxy support
Gordon Tyler
gordon at doxxx.net
Thu Oct 29 23:00:38 GMT 2009
On 10/29/2009 6:25 PM, Vincent Ladeuil wrote:
> What I meant was that the HTTPTransport class doesn't match the
> httplib, urllib2 and _urllib2_wrappers classes design and not
> respecting that design is the cause of some of the problems
> you're encountering.
<snip>
> + # Use scheme default if no port specified in URL
> + if not self.proxied_port:
> + if self.get_type() == 'http':
> + self.proxied_port = httplib.HTTPConnection.default_port
> + elif self.get_type() == 'https':
> + self.proxied_port = httplib.HTTPSConnection.default_port
>
> That is the controversial part. That code will not be needed if
> you define two classes instead of one, each using the right
> HTTP[S]Connection attribute.
I get what you're saying. Two Transport classes, one for HTTP and and
one for HTTPS. Yeah, I can do that, no problem.
> You want to look at test_http among others, but be aware that we
> *don't* have a proxy test server, we fake one for test purposes
> but I don't think you can reuse it.
Hmm... Why do I think the tests are going to be the hardest part of all
this? ;)
Ciao,
Gordon
More information about the bazaar
mailing list