diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2026-03-25 19:03:38 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2026-03-29 22:20:59 +0200 |
| commit | 0a8acc00599a43763697f8bfc4542ff0b34cf689 (patch) | |
| tree | e6405bcd4e45cd46a1419a3297cbfcc15a0eb964 /tests | |
| parent | 425aa1bf7c35839f5e500515ff3b5a861a7533d6 (diff) | |
tests: Pass ‘User-Agent’ header when downloading from www.gnu.org.
This test had been failing for a few months in part due to this change at
www.gnu.org.
* tests/derivations.scm ("fixed-output derivation, network access, external host"):
Pass #:headers to ‘http-get’.
Change-Id: Ife54e65b2665704af433df669df0d4010b49884c
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Merges: #7470
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/derivations.scm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/derivations.scm b/tests/derivations.scm index a5e82238a48..7ae8fce8cfb 100644 --- a/tests/derivations.scm +++ b/tests/derivations.scm | |||
| @@ -584,8 +584,11 @@ | |||
| 584 | (set! (@ (guile) set-port-encoding!) (const #t)) | 584 | (set! (@ (guile) set-port-encoding!) (const #t)) |
| 585 | 585 | ||
| 586 | (let-values (((response body) | 586 | (let-values (((response body) |
| 587 | ;; Note: www.gnu.org returns 403 when | ||
| 588 | ;; 'User-Agent' is missing. | ||
| 587 | (http-get "http://www.gnu.org/licenses/gpl-3.0.txt" | 589 | (http-get "http://www.gnu.org/licenses/gpl-3.0.txt" |
| 588 | #:decode-body? #f))) | 590 | #:decode-body? #f |
| 591 | #:headers '((user-agent . "GNU Guile"))))) | ||
| 589 | (call-with-output-file %output | 592 | (call-with-output-file %output |
| 590 | (lambda (port) | 593 | (lambda (port) |
| 591 | (put-bytevector port body))))) | 594 | (put-bytevector port body))))) |
