Dear Stefan,

In data mercoledì, 18 luglio 2012 18.26:27, Stefan Hesselbach ha scritto:
> From our Invenio server we can only access the Internet via a http proxy. 
> For most purposes this can be done using environment variables http_proxy,
> HTTP_PROXY, ...
> However, for OAI Harvest this seems not to work. Looking into 
> oai_harvest_getter.py I found that there httplib is used in the function 
> OAI_Request(). And searching a bit for use of proxies together with 
> httplib I found that httplib does not respect the environment variables 
> like http_proxy (as opposed to urllib). Is this true?
> 
> The way to use a proxy with httplib seems to be:
> >>> conn = httplib.HTTPConnection("my.proxy.host", "proxy_port")
> >>> conn.request("GET", "http://OAI.source.host:port/path";)
> instead of
> >>> conn = httplib.HTTPConnection("OAI.source.host", "port")
> >>> conn.request("GET", "/path")
> 
> Do you know an easy way to get OAI Harvest to work behind a proxy, i.e. 
> without hacking oai_harvest_getter.py?

I suspect the only way is really to extend oai_harvest_getter.py in the way 
you suggest. We can either have Invenio look for HTTP_PROXY or move to use 
urllib(2) instead of httplib.

Il ticketize this. Thanks for reporting it. We'll propose a patch ASAP.

Cheers!
        Samuele

-- 
Samuele Kaplun
Invenio Developer ** <http://invenio-software.org/>

Reply via email to