1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2025-01-29 04:09:19 +01:00

- [gemini] percent encoded query.

This commit is contained in:
cage 2020-06-23 15:22:28 +02:00
parent adb83bf462
commit f861d80b8c
5 changed files with 8 additions and 2 deletions

View File

@ -122,6 +122,7 @@ install_dependency () {
--eval "(ql:quickload \"cffi\")" \
--eval "(ql:quickload \"babel\")" \
--eval "(ql:quickload \"puri\")" \
--eval "(ql:quickload \"percent-encoding\")" \
--eval "(sb-ext:quit)";
}

View File

@ -218,7 +218,7 @@
(let* ((uri (make-gemini-uri host path query port))
(ctx (cl+ssl:make-context :verify-mode cl+ssl:+ssl-verify-none+)))
(when query
(setf uri (strcat uri "?" query)))
(setf uri (strcat uri "?" (percent-encode query))))
(cl+ssl:with-global-context (ctx :auto-free-p t)
(let ((socket (usocket:socket-connect host port :element-type '(unsigned-byte 8))))
(unwind-protect

View File

@ -355,7 +355,8 @@
:annotated-text-symbol
:annotated-text-value
:box-fit-multiple-column-annotated
:collect-links))
:collect-links
:percent-encode))
(defpackage :html-utils
(:use

View File

@ -670,3 +670,6 @@ printed in the box column by column; in the example above the results are:
results
:test #'string=))
results)))
(defun percent-encode (string)
(percent-encoding:encode string :encoding :utf-8))

View File

@ -50,6 +50,7 @@
:usocket
:babel
:puri
:percent-encoding
:uiop)
:components ((:file "package")
(:file "config")