raco pkg: use 'secure for an HTTPS catalog
This commit is contained in:
parent
92f1bfa4d2
commit
d160cb81a8
|
@ -7,7 +7,6 @@
|
|||
file/gunzip
|
||||
file/private/check-path
|
||||
openssl/sha1
|
||||
openssl
|
||||
net/url
|
||||
net/head
|
||||
net/http-client
|
||||
|
@ -282,11 +281,10 @@
|
|||
(define (ssl-context verify?)
|
||||
(cond
|
||||
[(or (not verify?)
|
||||
(getenv "GIT_SSL_NO_VERIFY")
|
||||
(not ssl-available?))
|
||||
(getenv "GIT_SSL_NO_VERIFY"))
|
||||
(current-https-protocol)]
|
||||
[else
|
||||
(ssl-secure-client-context)]))
|
||||
'secure]))
|
||||
|
||||
;; ----------------------------------------
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#lang racket/base
|
||||
(require net/url
|
||||
net/url-connect
|
||||
racket/format
|
||||
"print.rkt"
|
||||
"config.rkt")
|
||||
|
@ -57,9 +58,10 @@
|
|||
(lambda (f) (f)))
|
||||
(lambda ()
|
||||
(define-values (p hs)
|
||||
(get-pure-port/headers url headers
|
||||
#:redirections 25
|
||||
#:status? #t))
|
||||
(parameterize ([current-https-protocol 'secure])
|
||||
(get-pure-port/headers url headers
|
||||
#:redirections 25
|
||||
#:status? #t)))
|
||||
(define status (string->number (substring hs 9 12)))
|
||||
(cond
|
||||
[(memv status success-codes)
|
||||
|
|
Loading…
Reference in New Issue
Block a user