The Lambda Lab
/
projects
/
elpher.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ca8d8fb
)
Fixed incorrect references to gemini.
author
plugd
<plugd@thelambdalab.xyz>
Thu, 5 May 2022 11:57:22 +0000
(13:57 +0200)
committer
plugd
<plugd@thelambdalab.xyz>
Thu, 5 May 2022 11:57:22 +0000
(13:57 +0200)
elpher.el
patch
|
blob
|
history
diff --git
a/elpher.el
b/elpher.el
index
9540cee
..
e0b28f9
100644
(file)
--- a/
elpher.el
+++ b/
elpher.el
@@
-1697,6
+1697,7
@@
can be used to toggle the display of the preformatted text."
headers))
(reverse headers))))
headers))
(reverse headers))))
+
;; Spartan page retrieval
(defvar elpher-spartan-redirect-chain)
;; Spartan page retrieval
(defvar elpher-spartan-redirect-chain)
@@
-1711,7
+1712,7
@@
can be used to toggle the display of the preformatted text."
(insert content)
(elpher-restore-pos))
(elpher-with-clean-buffer
(insert content)
(elpher-restore-pos))
(elpher-with-clean-buffer
- (insert "LOADING
GEMINI
... (use 'u' to cancel)\n"))
+ (insert "LOADING
SPARTAN
... (use 'u' to cancel)\n"))
(setq elpher-spartan-redirect-chain nil)
(elpher-get-spartan-response address renderer))
(error
(setq elpher-spartan-redirect-chain nil)
(elpher-get-spartan-response address renderer))
(error
@@
-1742,8
+1743,8
@@
that the response was malformed."
(error "Malformed response: No CRLF-delimited header found in response %s" response))))
(defun elpher-process-spartan-response (response-string renderer)
(error "Malformed response: No CRLF-delimited header found in response %s" response))))
(defun elpher-process-spartan-response (response-string renderer)
- "Process the
gemini
response RESPONSE-STRING and pass the result to RENDERER."
- (let ((response-components (elpher-parse-
gemini
-response response-string)))
+ "Process the
spartan
response RESPONSE-STRING and pass the result to RENDERER."
+ (let ((response-components (elpher-parse-
spartan
-response response-string)))
(let ((response-code (elt response-components 0))
(response-meta (elt response-components 1))
(response-body (elt response-components 2)))
(let ((response-code (elt response-components 0))
(response-meta (elt response-components 1))
(response-body (elt response-components 2)))
@@
-1754,7
+1755,7
@@
that the response was malformed."
(message "Following redirect to %s" response-meta)
(if (>= (length elpher-spartan-redirect-chain) 5)
(error "More than 5 consecutive redirects followed"))
(message "Following redirect to %s" response-meta)
(if (>= (length elpher-spartan-redirect-chain) 5)
(error "More than 5 consecutive redirects followed"))
- (let* ((current-address (elpher-page-address current-page))
+ (let* ((current-address (elpher-page-address
elpher-
current-page))
(redirect-address (elpher-address-from-url
(concat "spartan://"
(elpher-address-host current-address)
(redirect-address (elpher-address-from-url
(concat "spartan://"
(elpher-address-host current-address)
@@
-1767,10
+1768,10
@@
that the response was malformed."
(elpher-page-set-address elpher-current-page redirect-address)
(add-to-list 'elpher-gemini-redirect-chain redirect-address)
(elpher-get-spartan-response redirect-address renderer)))
(elpher-page-set-address elpher-current-page redirect-address)
(add-to-list 'elpher-gemini-redirect-chain redirect-address)
(elpher-get-spartan-response redirect-address renderer)))
- (?4 ;
Temporary failure
+ (?4 ;
Client error
(error "Spartan server reports CLIENT ERROR for this request: %s %s"
response-code response-meta))
(error "Spartan server reports CLIENT ERROR for this request: %s %s"
response-code response-meta))
- (?5 ;
Permanent failure
+ (?5 ;
Server error
(error "Spartan server reports SERVER ERROR for this request: %s %s"
response-code response-meta))
(_other
(error "Spartan server reports SERVER ERROR for this request: %s %s"
response-code response-meta))
(_other