fukamachi / quri

Yet another URI library for Common Lisp
111 stars 23 forks source link

Return "/" instead NIL #44

Open C-Entropy opened 3 years ago

C-Entropy commented 3 years ago
(use-package :quri)
(defparameter *uri* (uri "http://www.ics.uci.edu"))
(uri-path *uri*)==>NIL;; "/" should be better.
svetlyak40wt commented 3 years ago

I think this will be consistent with behaviour of browsers.

Ambrevar commented 3 years ago

http://www.ics.uci.edu/ is a different URI for which the path is /. Is there a use case for which we would still want to return a NIL path?

C-Entropy commented 3 years ago

I have not seen this kind of example yet. But return NIL does cause error in both woo and wookie, see it here. (Since firefox will just send http://www.ics.uci.edu instead of http://www.ics.uci.edu/ and I believe most people will just simply type http://www.ics.uci.edu ) More research in other case may be needed. Maybe there are some cases that should return NIL, but I think in most case "/" should be returned when request like http://www.ics.uci.edu.

Ambrevar commented 3 years ago

Would a empty string ("") be an option?

C-Entropy commented 3 years ago

I think so, but it may need to be specified out specially. So the developer who use quri know this. And then wookie and woo and weblocks and others may need to change some code too. Maybe better check the source code for why ever a NIL is returned

Ambrevar commented 3 years ago

What do you mean with "specified out"? Mentioned in a ChangeLog?

C-Entropy commented 3 years ago

And documention too. It's very likely that pepole may not be aware of that(like me).

Maybe better check the source code for why ever a NIL is returned.

Ambrevar commented 3 years ago

@C-Entropy @svetlyak40wt Please see #45.

C-Entropy commented 3 years ago

Sorry I can't tell about the code itself much.(I'm just a new hand:) ). But I'm happy to help with opening issue at wookie once you make progress.

swapneils commented 1 year ago

This issue was resolved by #60, correct? I'm canvassing the available frameworks for a planned web app, and the issue seemed to propagate up into Woo, which makes it relevant.