Re: [MarkLogic Dev General] bug in xdmp:get-request-field?

2015-10-12 Thread David Lee
Useful to note a few things. 1) xdmp:get-request-field("Param") Will return the *decoded* field data (from the union of request URI's and form body data.) 2) Rewriters can do very 'interesting' things if they put humpty dumpty back together incorrectly. Double encoded, non-encoded , double-deco

Re: [MarkLogic Dev General] bug in xdmp:get-request-field?

2015-10-12 Thread neil bradley
Geert, Ah yes, I do. And that does appear to be the problem, even thougjh I do not actually change that particular URL, the process of passing it through has unescaped the characters. here are debug log entries: 2015-10-12 10:05:24.308 Info: xxx: ORIGINAL URL >>> [8040] [GET] /TestHash.xqy?TextAr

Re: [MarkLogic Dev General] bug in xdmp:get-request-field?

2015-10-12 Thread Geert Josten
Cannot reproduce on 7.0-5.1, nor on 8.0-3. Do you have any rewriting in between? Kind regards, Geert On 10/12/15, 11:07 AM, ""neil bradley"" wrote: >Sorry, in my previous response I meant to say "note", not "not", which >changes the message somewhat - there IS a problem with & as well as with >

Re: [MarkLogic Dev General] bug in xdmp:get-request-field?

2015-10-12 Thread neil bradley
Sorry, in my previous response I meant to say "note", not "not", which changes the message somewhat - there IS a problem with & as well as with #! I have jsut been testing with form data. The same thing happens with the content of at least, when I send data using GET or PUT protocol. But it works

Re: [MarkLogic Dev General] bug in xdmp:get-request-field?

2015-10-12 Thread neil bradley
Geert, I get the same result. Also not that the same thing happens if it is a & instead of a # in the parameter value. Neil. on 12/10/15 9:46 AM, Geert Josten wrote: > Hi Neil, > > What happens if you skip the url-decode? That should be unnecessary. Leave > the url-encode in place though..

Re: [MarkLogic Dev General] bug in xdmp:get-request-field?

2015-10-12 Thread Geert Josten
Hi Neil, What happens if you skip the url-decode? That should be unnecessary. Leave the url-encode in place though.. Kind regards, Geert On 10/12/15, 10:39 AM, "general-boun...@developer.marklogic.com on behalf of "neil bradley"" wrote: >I think there is a bug in xdmp:get-request-field() when

[MarkLogic Dev General] bug in xdmp:get-request-field?

2015-10-12 Thread neil bradley
I think there is a bug in xdmp:get-request-field() when the parameter contains a # character, even when it is URL-encoded. It seems that the code that returns the parameter value assumes that # terminates the value. And it still happens even if I add another # at the end of the URL. Here is some c