unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: iyzsong@member.fsf.org (宋文武)
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] download: Support 'https_proxy'.
Date: Mon, 13 May 2019 21:36:52 +0800	[thread overview]
Message-ID: <874l5ycw7f.fsf@member.fsf.org> (raw)
In-Reply-To: <87o946u4sy.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Mon, 13 May 2019 10:39:09 +0200")

Ludovic Courtès <ludo@gnu.org> writes:

> Hi!
>
> iyzsong@member.fsf.org (宋文武) 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?= <iyzsong@member.fsf.org>
>> 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 bug-guile@gnu.org.
>
> Thank you!
>
> Ludo’.

Okay, get it!

      reply	other threads:[~2019-05-13 13:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-10 14:19 [PATCH] download: Support 'https_proxy' 宋文武
2019-05-13  8:39 ` Ludovic Courtès
2019-05-13 13:36   ` 宋文武 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874l5ycw7f.fsf@member.fsf.org \
    --to=iyzsong@member.fsf.org \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).