From 3ebc7bd1bf28b61f262f8cae392d399caeaee047 Mon Sep 17 00:00:00 2001 From: cage Date: Fri, 23 Sep 2022 12:06:35 +0200 Subject: [PATCH] - [gopher] uses type 1 lines as default type for URI. --- src/gopher/parser.lisp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gopher/parser.lisp b/src/gopher/parser.lisp index a68197d..4c2d35b 100644 --- a/src/gopher/parser.lisp +++ b/src/gopher/parser.lisp @@ -324,8 +324,8 @@ #\/) (and (+ (not #\/)) #\/)) - (and (+ (not #\/)) - #\/) + (? (and (+ (not #\/)) + #\/)) (* (character-ranges (#\u0000 #\uffff)))) (:function (lambda (a) (let* ((host-port (third a)) @@ -334,7 +334,9 @@ (parse-integer (coerce (third host-port) 'string)) 70)) (type-path (fourth a)) - (type (coerce (car type-path) 'string)) + (type (if (car type-path) + (coerce (car type-path) 'string) + +line-type-dir+)) (path (coerce (fifth a) 'string))) (list host port path type)))))