[basex-talk] web:response-header()

2019-01-09 Thread Johannes Bauer
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

Re: [basex-talk] web:response-header()

2019-01-09 Thread Christian Grün
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

[basex-talk] web:response-header & Set-Cookie

2018-09-17 Thread Bogdan Bogucki
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

Re: [basex-talk] web:response-header & Set-Cookie

2018-09-18 Thread Marco Lettere
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() |