[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] svn-download: Respect current-http-proxy when downloadin
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH 1/2] svn-download: Respect current-http-proxy when downloading. |
Date: |
Thu, 03 Mar 2016 17:39:21 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Jookia <address@hidden> skribis:
> On Sun, Feb 28, 2016 at 05:44:18PM +0100, Ludovic Courtès wrote:
>> > + (define proxy-config
>> > + (if (current-http-proxy)
>> > + (and-let* ((proxy-uri (string->uri (current-http-proxy)))
>> > + (proxy-host (uri-host proxy-uri))
>> > + (proxy-port (number->string (uri-port proxy-uri)))
>> > + (config-host "servers:global:http-proxy-host=")
>> > + (config-port "servers:global:http-proxy-port="))
>> > + `("--config-option" ,(string-append config-host proxy-host)
>> > + "--config-option" ,(string-append config-port proxy-port)))
>> > + '()))
>>
>> I would suggest using an explicit (getenv "http_proxy") instead of
>> (current-http-proxy) since the latter is specific to the (web …)
>> modules, which are not involved here.
>
> Sorry for the reply, now that I have an RFC for the coreboot patches I've
> looked
> back at this. The URI module is also in the web module, and I'm not sure how I
> feel about rewriting a URI parser to get the host and port out of http_proxy.
Of course you should keep using ‘string->uri’, no problem with that.
I’m just saying that the code should explicitly check for the
‘http_proxy’ environment variable instead of using the
‘current-http-proxy’ SRFI-9 parameter.
WDYT?
Ludo’.