fukamachi/quri

Bug in `quri:uri-equal`

aadcg opened this issue · 5 comments

aadcg commented

Notice the following amazing facts:

(quri:uri-equal (quri.uri.http:make-uri-https :host "nyxt.atlas.engineer" :path "")
                (quri.uri.http:make-uri-https :host "nyxt.atlas.engineer" :path "")) -> T
(quri:uri-equal (quri.uri.http:make-uri-https :host "nyxt.atlas.engineer")
                (quri.uri.http:make-uri-https :host "nyxt.atlas.engineer")) -> T
(quri:uri-equal (quri.uri.http:make-uri-https :host "nyxt.atlas.engineer" :path "/")
                (quri.uri.http:make-uri-https :host "nyxt.atlas.engineer" :path "/")) -> T
(quri:uri-equal (quri.uri.http:make-uri-https :host "nyxt.atlas.engineer" :path "")
                (quri.uri.http:make-uri-https :host "nyxt.atlas.engineer" :path "/")) -> NIL
(quri:uri-equal (quri.uri.http:make-uri-https :host "nyxt.atlas.engineer")
                (quri.uri.http:make-uri-https :host "nyxt.atlas.engineer" :path "/")) -> NIL
(quri:uri-equal (quri.uri.http:make-uri-https :host "nyxt.atlas.engineer" :path "")
                (quri.uri.http:make-uri-https :host "nyxt.atlas.engineer")) -> NIL

You got bitten by the oldest open bug: #44.

See #45 for a discussion.

aadcg commented

From my cursory look, #45 is precisely the fix I had in mind (ensuring that path is initialized with the empty string). I will get acquainted with the whole discussion.

aadcg commented

Update. Added the complete set of assertions to look out for.

Can we close this?

aadcg commented

As soon as PR #60 gets merged :)