browser does not execute redirects
Hi guys, i have a problem with redirects in basex. I have following function: declare %restxq:path("anyPath") function { "Some XQuery Code", <restxq:redirect xmlns:restxq="http://exquery.org/ns/restxq ">/restxq/anyOtherPath</restxq:redirect> }; This function I call with http://localhost/restxq/anyPath in my browser (Chrome). So I expect, that the browser gets the redirect an executes it. But it only returns: <restxq:redirect xmlns:restxq="http://exquery.org/ns/restxq ">/restxq/anyOtherPath</restxq:redirect> instead of the redirected page. In the attachment there is a screenshot. Is there anyone with the same problem or a solution? Regards, Florian PS: Are there any BaseX developer meetings in Germany?
Hi Florian,
declare %restxq:path("anyPath") function { "Some XQuery Code", <restxq:redirect xmlns:restxq="http://exquery.org/ns/restxq">/restxq/anyOtherPath</restxq:redirect> };
please note that redirects cannot be mixed with additional output. Instead, what you can e.g. do is to perform updates and then use a redirect to another URL. I guess this info may need to be added in our documentation [1].. Hope this helps, Christian [1] http://docs.basex.org/wiki/RESTXQ#Forwards_and_Redirects
This function I call with http://localhost/restxq/anyPath in my browser (Chrome). So I expect, that the browser gets the redirect an executes it. But it only returns: <restxq:redirect xmlns:restxq="http://exquery.org/ns/restxq">/restxq/anyOtherPath</restxq:redirect> instead of the redirected page.
In the attachment there is a screenshot.
Is there anyone with the same problem or a solution?
Regards,
Florian
PS: Are there any BaseX developer meetings in Germany?
_______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
participants (2)
-
Christian Grün -
Florian Eckey