From 608a50b66c73d5bdfd224195b839e01b781c354c Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 13 Jan 2017 18:22:53 +0100 Subject: http-client: Provide 'User-Agent' header by default. * guix/http-client.scm (http-fetch): Add #:headers parameter and honor it. Rename 'auth-header' to 'headers'. * guix/import/github.scm (json-fetch*): Add comment about required User-Agent. --- guix/import/github.scm | 1 + 1 file changed, 1 insertion(+) (limited to 'guix/import') diff --git a/guix/import/github.scm b/guix/import/github.scm index a41511aff6..df5a6b0e08 100644 --- a/guix/import/github.scm +++ b/guix/import/github.scm @@ -36,6 +36,7 @@ (guard (c ((and (http-get-error? c) (= 404 (http-get-error-code c))) #f)) ;"expected" if package is unknown + ;; Note: github.com returns 403 if we omit a 'User-Agent' header. (let* ((port (http-fetch url)) (result (json->scm port))) (close-port port) -- cgit v1.2.3