Thanks Geert!

cheers,
Jakob.

On Thu, Mar 23, 2017 at 9:19 AM, Geert Josten <[email protected]>
wrote:

> This seems to sum up all relevant parts nicely:
>
> http://stackoverflow.com/questions/15641694/are-uris-
> case-insensitive/26196170#26196170
>
> And it seems to confirm your statements. I raised RFE #3921 on your
> behalf..
>
> Cheers,
> Geert
>
> From: <[email protected]> on behalf of Jakob Fix <
> [email protected]>
> Reply-To: MarkLogic Developer Discussion <[email protected]>
> Date: Thursday, March 23, 2017 at 1:02 AM
> To: General Mark Logic Developer Discussion <[email protected].
> com>
> Subject: [MarkLogic Dev General] potential non-conformance with RFC 3986?
>
> Hello,
>
> we recently observed an unexpected behaviour in how MarkLogic treats the
> keys in the query part of a submitted URL (note the case of the two query
> param keys):
>
> http://localhost:9999/app/test.xqy?param=yes&Param=no
>
> let $q1 := xdmp:get-request-field('param')
> let $q2 := xdmp:get-request-field('Param')
>
> return "q1: " || $q1 || " -- q2: " || $q2
>
> one should reasonably expect to see the following result:
>
> q1: yes -- q2: no
>
> However, the actual result is an error because "arg1 is not of type
> xs:anyAtomicType?"
>
> XDMP-ARGTYPE: (err:XPTY0004) "q1: " || $q1 || " -- q2: " || $q2 -- arg1 is
> not of type xs:anyAtomicType?in /app/test.xqy, at 7:11 [1.0-ml]
> $q1 = ("yes", "no")
> $q2 = ("yes", "no")
>
> xdmp:get-request-field-names() correctly returns both 'param' and 'Param'.
>
> For some reason, MarkLogic normalises (presumably lowercases) the keys of
> the query string when looking up a query parameter value which seems to be
> counter to what is described in section 6.2.2.1 Case normalisation of RFC
> 3986 [1]:
>
> When a URI uses components of the generic syntax, the component syntax
> equivalence rules always apply; namely, that the scheme and host are
> case-insensitive and therefore should be normalized to lowercase. For
> example, the URI <HTTP://www.EXAMPLE.com/> is equivalent to <
> http://www.example.com/>. *The other generic syntax components are
> assumed to be case-sensitive* unless specifically defined otherwise by
> the scheme (see Section 6.2.3).
>
> Are we interpreting the RFC wrongly?
>
> Yes, I've tested this on 8.0-6.3.
>
> cheers,
> Jakob.
>
> PS: Thanks to my colleague Romuald for mentioning this over beer! ;-)
>
>
> [1] https://tools.ietf.org/html/rfc3986#section-6.2.2.1
>
>
> _______________________________________________
> General mailing list
> [email protected]
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
>
>
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to