Skip to content

The search command ignore proxy settings #243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mordillo123 opened this issue Mar 24, 2011 · 4 comments
Closed

The search command ignore proxy settings #243

mordillo123 opened this issue Mar 24, 2011 · 4 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@mordillo123
Copy link

The "search" command ignore the HTTP_PROXY environment variable. I have done a very little (and crap) change in download.py file to enable this option and it works for me :-)
At line 28:

    # xmlrpclib_transport = xmlrpclib.Transport()
    class ProxiedTransport(xmlrpclib.Transport):
      def make_connection(self, host):
        self.realhost = host
        proxy = urlopen.get_proxy()
        if proxy: 
          proxy = proxy.lstrip("http://")
          h = httplib.HTTP(proxy)
        else: 
          h = httplib.HTTP(host)
        return h
      def send_request(self, connection, handler, request_body):
        connection.putrequest("POST", 'http://%s%s' % (self.realhost, handler))
      def send_host(self, connection, host):
        connection.putheader('Host', self.realhost)
    xmlrpclib_transport = ProxiedTransport()

based on last example at the end of page http://docs.python.org/library/xmlrpclib.html

It's possible to implement (in a proper way) this option?
Tnx :-)
Regards

@ohookins
Copy link

ohookins commented Sep 7, 2011

I'm also being hit by this. I would suggest committing that patch to a local branch and sending a pull request.

@ogirardot
Copy link
Contributor

duplicate of #395

@carljm carljm closed this as completed Dec 10, 2011
@Gnarfoz
Copy link

Gnarfoz commented Aug 21, 2013

Why has this issue been closed even though it contains a valid workaround for a 2+ year old issue?

@pfmoore
Copy link
Member

pfmoore commented Aug 21, 2013

Probably because it's a duplicate of #395, and you should look there for any further progress (there isn't much, admittedly).

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 5, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

No branches or pull requests

6 participants