Hello,
I've a question to the response-header() function of the web module.
In my RESTXQ function I try to return a response with HTTP Status 404:
module namespace basex ='basex';
declare %rest:GET %rest:path("/db/{$db}/doc/{$doc}")
%rest:produces("application/xml")
%output:method("xml")
f
Dear Johannes,
Thanks for the observation. The third argument was added to the
function just recently, and it was done wrong. I have just fixed this,
a new stable snapshot is available [1]. The next patch release (BaseX
9.1.2) will be released in the near future.
Best,
Christian
[1] http://files
Hello,
When I try invoke following code:
return (
web:response-header(
map { 'media-type': web:content-type($path) },
map { 'Cache-Control': 'max-age=3600,public' },
map { 'Set-Cookie': 'JSESSIONID=' || session:id() || ';max-age=1800' }
),
file:read-bin
Hi Bogdan,
I assume the last map is for options only. All headers should go into
the second map.
Try with:
return (
web:response-header(
map { 'media-type': web:content-type($path) },
map { 'Cache-Control': 'max-age=3600,public', 'Set-Cookie':
'JSESSIONID=' || session:id() |
4 matches
Mail list logo