[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] download: Support 'https_proxy'.
From: |
宋文武 |
Subject: |
Re: [PATCH] download: Support 'https_proxy'. |
Date: |
Mon, 13 May 2019 21:36:52 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Ludovic Courtès <address@hidden> writes:
> Hi!
>
> address@hidden (宋文武) skribis:
>
>> Hello, this patch add 'https_proxy' to 'guix download' (and guix-daemon
>> if we update guix?):
>
> Neat!
Pushed, thank you for the review!
>
>> From 424da6e43ba9c928403e3fd9b42e75d0fe90fc23 Mon Sep 17 00:00:00 2001
>> From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <address@hidden>
>> Date: Fri, 10 May 2019 21:27:40 +0800
>> Subject: [PATCH] download: Support 'https_proxy'.
>>
>> * guix/build/download.scm (setup-http-tunnel): New procedure.
>> (open-connection-for-uri): Honor the 'https_proxy' environment variable.
>
> [...]
>
>> +(define (setup-http-tunnel port uri)
>> + "Establish a tunnel to the destination server of URI."
>
> Maybe “Establish over PORT an HTTP tunnel to the destination server of
> URI.”?
Sure.
>
> Otherwise LGTM!
>
>> Some problems and questions:
>>
>> - It assumes ‘https_proxy’ is ‘http://PROXY-SERVER:PORT’, if the scheme
>> part is missing, it fail.
>
> That’s already the case with ‘http_proxy’.
>
> It seems that other tools can happily deal with the lack of a URI
> scheme, so perhaps in a subsequent patch we should add code to
> automatically add a URI scheme when it’s missing?
Yes, I think the URI scheme can be ‘http’, ‘https’ or ‘socks5’, etc. and
default to ‘http’. We only have ‘http’ now, other are good exercise :)
>
>> - It fails some servers (eg: www.google.com) for me while curl works...
>
> For www.google.com it fails even without ‘https_proxy’, so that’s OK.
> :-)
>
>> - I think this should go into guile’s ‘(web client)’ module?
>
> Yes! Once we’ve committed it Guix, it’d be great if you could a similar
> patch to address@hidden
>
> Thank you!
>
> Ludo’.
Okay, get it!