Am 2012-04-20 10:19, schrieb "Stéphane S.":
> Is there a way to detect a malformed URL containing a misplaced ampersand (by misplaced I mean not used to declare inline URL parameters) in controller.xql ?
> Actually (as of exist 1.4.1-rev15155-20110815), this raises an early exception in the URLRerwrite filter and controller.xql does not seem to be called (*)
> You can try by yourself on the exist-db.org web site : http://exist-db.org/exist/foo&bar
> Where it returns :
> HTTP ERROR 500
> Problem accessing /exist/foo&bar. Reason:
> XPST0003 : Invalid character (r) in entity name (bar) or missing ;
Hello Stéphane, hello All,
in my understanding, http://tools.ietf.org/html/rfc3986#section-3.3 is
quite clear on that this is NOT a MALformed url, because the ampersand,
being a sub-delimiter, can legitimately and not-encoded be "pchar" part
inside of a segment in the path component of a URI.
The error report seems to indicate, that above URI is treated by
eXist-db as xml source text. While instead it is a URI. So from your
link to apple.com, the apache webserver there rightly returns an HTTP
404 not-found, and not a 400 bad-request.
Please excuse, if I use this thread to remind of SF bug 3466454
regarding PLUS signs in path segments of URIs, that are wrongly
/url-decoded/ by eXist-db
- eXist URI parsing is in need of an overhaul that, in my view, should
go into 2.0.