Skip to content

Commit

Permalink
uri-to-url special handling in the absence of any domains
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinmera committed Aug 11, 2024
1 parent 6e17b3c commit e2c2777
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions uri.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,11 @@
(port (case (port uri)
((443 80) NIL)
(T (port uri)))))
(format NIL "~a://~{~a~^.~}~@[:~a~]/~/radiance-core::format-urlpart/~@[?~/radiance-core::format-query/~]~@[#~/radiance-core::format-urlpart/~]"
schema (reverse (domains uri)) port (or (path uri) "") query fragment)))
(if (domains uri)
(format NIL "~a://~{~a~^.~}~@[:~a~]/~/radiance-core::format-urlpart/~@[?~/radiance-core::format-query/~]~@[#~/radiance-core::format-urlpart/~]"
schema (reverse (domains uri)) port (or (path uri) "") query fragment)
(format NIL "/~/radiance-core::format-urlpart/~@[?~/radiance-core::format-query/~]~@[#~/radiance-core::format-urlpart/~]"
(or (path uri) "") query fragment))))

(defun make-url (&key domains port path schema query fragment (representation :external))
(uri-to-url (make-uri :domains domains
Expand Down

0 comments on commit e2c2777

Please sign in to comment.