Unicode and path-char-p
ruricolist opened this issue · 5 comments
The following results in an out-of-bounds error:
(quri:uri "//www.youtube.com/embed/”6j0LpmSdWg4”")
(I wish I could say I made up that URL, but no, it's a real URL encountered in parsing a real feed.)
I'm not sure what the best way to handle something like this is -- to percent-encode it or to signal uri-malformed-string
-- but opaque errors from deep inside the parsing process were something I had hoped to leave behind with PURI.
I got a QURI.ERROR:URI-MALFORMED-STRING
error with SBCL 1.2.11 on Mac OS:
debugger invoked on a QURI.ERROR:URI-MALFORMED-STRING:
URI "//www.youtube.com/embed/”6j0LpmSdWg4”" contains an illegal character #\RIGHT_DOUBLE_QUOTATION_MARK at position 24.
I suspect you're using older QURI than 4e51874. Update your Quicklisp dist and check if your QURI is loaded from the right path by (ql:where-is-system :quri)
.
With the latest QURI, on SBCL, I get quri.error:uri-malformed-string
. But on Clozure I still get a simple-error
.
The different appears to be that, in SBCL, the combination of (speed 3) (safety 0)
is sufficient to suppress the array bounds check, whereas in Clozure it it not.
Is reading past the end of the array really the intended behavior?
That sounds like a bug. I'll look into it later.
BTW, is it okay if it still raises an error and no way to continue in your use case?
An error with no way to continue is OK, as long as it's recognizable as coming from QURI.
Okay, fixed and tests have passed. https://travis-ci.org/fukamachi/quri/builds/75709054
Thank you for reporting.