mirror of https://codeberg.org/cage/tinmop/
- skipped redirect if parsing of iri failed.
This commit is contained in:
parent
e5597c6a80
commit
5e035458fe
|
@ -641,8 +641,8 @@
|
||||||
(flet ((on-input-complete (maybe-accepted)
|
(flet ((on-input-complete (maybe-accepted)
|
||||||
(when (ui::boolean-input-accepted-p maybe-accepted)
|
(when (ui::boolean-input-accepted-p maybe-accepted)
|
||||||
(pop-url-from-history specials:*message-window*)
|
(pop-url-from-history specials:*message-window*)
|
||||||
(let ((new-url (gemini-client:build-redirect-iri meta
|
(when-let ((new-url (gemini-client:build-redirect-iri meta
|
||||||
parsed-iri)))
|
parsed-iri)))
|
||||||
(db-utils:with-ready-database (:connect nil)
|
(db-utils:with-ready-database (:connect nil)
|
||||||
(request new-url
|
(request new-url
|
||||||
:enqueue enqueue
|
:enqueue enqueue
|
||||||
|
|
|
@ -541,7 +541,8 @@ TODO: Add client certificate."
|
||||||
(labels ((redirect-dispatch (status code-description meta response socket iri parsed-iri)
|
(labels ((redirect-dispatch (status code-description meta response socket iri parsed-iri)
|
||||||
(declare (ignore status code-description response socket parsed-iri))
|
(declare (ignore status code-description response socket parsed-iri))
|
||||||
(when (< redirect-count +maximum-redirections+)
|
(when (< redirect-count +maximum-redirections+)
|
||||||
(slurp-gemini-url (build-redirect-iri meta iri) (1+ redirect-count))))
|
(when-let ((iri-redirect (build-redirect-iri meta iri)))
|
||||||
|
(slurp-gemini-url iri-redirect (1+ redirect-count)))))
|
||||||
(success-dispatch (status code-description meta response socket iri parsed-iri)
|
(success-dispatch (status code-description meta response socket iri parsed-iri)
|
||||||
(declare (ignorable code-description iri meta parsed-iri))
|
(declare (ignorable code-description iri meta parsed-iri))
|
||||||
(debug-gemini "success response data: ~s ~s ~s ~s ~s ~s"
|
(debug-gemini "success response data: ~s ~s ~s ~s ~s ~s"
|
||||||
|
|
Loading…
Reference in New Issue