File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 (:export
77 # :fetcher
88 # :*quietly-use-https*
9- # :register-fetch-scheme-functions))
9+ # :register-fetch-scheme-functions
10+ # :no-https-error))
1011
1112(in-package # :ql-https)
1213
14+ (define-condition no-https-error (error )
15+ ((url :initarg :url
16+ :reader no-https-url))
17+ (:report (lambda (c stream )
18+ (format stream " We don't use HTTP here!~& URL: ~A " (no-https-url c)))))
19+
1320(defvar *quietly-use-https* nil
1421 " If non-nil quietly use HTTPS." )
1522
3542 (verify-download file release))
3643 (values output file))
3744 (restart-case
38- (handler-bind ((error (lambda (c)
39- (declare (ignore c))
40- (when *quietly-use-https*
41- (invoke-restart ' use-https)))))
42- (error " We don't use HTTP here! ~& URL: ~A " url))
45+ (handler-bind ((no-https- error (lambda (c)
46+ (declare (ignore c))
47+ (when *quietly-use-https*
48+ (invoke-restart ' use-https)))))
49+ (error ' no-https-error :url url))
4350 (use-https ()
4451 :report " Retry with HTTPS."
4552 (apply #' fetcher
You can’t perform that action at this time.
0 commit comments