GNU bug report logs -
#26314
[PATCH] substitute: Send ‘User-Agent’ header.
Previous Next
Reported by: Tobias Geerinckx-Rice <me <at> tobias.gr>
Date: Thu, 30 Mar 2017 18:45:01 UTC
Severity: normal
Tags: patch
Done: Tobias Geerinckx-Rice <me <at> tobias.gr>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 26314 in the body.
You can then email your comments to 26314 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#26314
; Package
guix-patches
.
(Thu, 30 Mar 2017 18:45:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Tobias Geerinckx-Rice <me <at> tobias.gr>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Thu, 30 Mar 2017 18:45:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* guix/scripts/substitute.scm (narinfo-request): Pass ‘User-Agent’ #:headers
to ‘build-request’.
---
Guix,
This makes the User-Agent sent to substitute servers consistent.
Currently, ‘http-fetch’ (used to download .nars) sets it to ‘GNU Guile’,
while http-multiple-get (used to download .narinfos) leaves it empty.
(This brings the number of scattered '"GNU Guile"' user-agent settings
in Guix to 5, but moving it to %guix-default-http-user-agent does not
strike me as a meaningful improvement.)
Kind regards,
T G-R
guix/scripts/substitute.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index faeb01912..d3bccf4dd 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -520,8 +520,9 @@ indicates that PATH is unavailable at CACHE-URL."
(define (narinfo-request cache-url path)
"Return an HTTP request for the narinfo of PATH at CACHE-URL."
(let ((url (string-append cache-url "/" (store-path-hash-part path)
- ".narinfo")))
- (build-request (string->uri url) #:method 'GET)))
+ ".narinfo"))
+ (headers '((User-Agent . "GNU Guile"))))
+ (build-request (string->uri url) #:method 'GET #:headers headers)))
(define* (http-multiple-get base-uri proc seed requests
#:key port (verify-certificate? #t))
--
2.37.4
Information forwarded
to
guix-patches <at> gnu.org
:
bug#26314
; Package
guix-patches
.
(Fri, 31 Mar 2017 08:13:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 26314 <at> debbugs.gnu.org (full text, mbox):
Heya!
Tobias Geerinckx-Rice <me <at> tobias.gr> skribis:
> * guix/scripts/substitute.scm (narinfo-request): Pass ‘User-Agent’ #:headers
> to ‘build-request’.
> ---
>
> Guix,
>
> This makes the User-Agent sent to substitute servers consistent.
>
> Currently, ‘http-fetch’ (used to download .nars) sets it to ‘GNU Guile’,
> while http-multiple-get (used to download .narinfos) leaves it empty.
Sounds good to me.
Did the lack of ‘User-Agent’ cause you any problems?
> (This brings the number of scattered '"GNU Guile"' user-agent settings
> in Guix to 5, but moving it to %guix-default-http-user-agent does not
> strike me as a meaningful improvement.)
Agreed. :-)
Go for it!
Ludo’.
Reply sent
to
Tobias Geerinckx-Rice <me <at> tobias.gr>
:
You have taken responsibility.
(Fri, 31 Mar 2017 13:42:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Tobias Geerinckx-Rice <me <at> tobias.gr>
:
bug acknowledged by developer.
(Fri, 31 Mar 2017 13:42:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 26314-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Ludo',
On 31/03/17 10:12, Ludovic Courtès wrote:
> Did the lack of ‘User-Agent’ cause you any problems?
I recently got stuck behind an alt-right proxy that didn't seem to like
it, and had to hack a tunnel through it. I hope such things are rare.
> Go for it!
Pushed as f264e838c0f8b63e93cd7b8a9d5d8e2208d82467.
Thanks!
T G-R
[signature.asc (application/pgp-signature, attachment)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 29 Apr 2017 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 52 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.