Hi, We have two servers with similar jetty configuration, we find that an http:request call on static works on Linux but not on Windows. HOW TO REPLICATE Add an image test.png in webapp/static Try the attached .xqm (change img-url for your server path) Copy of the .xqm function for reference: declare %rest:path('/a-test')
%rest:GET %output:method("html") %output:html-version("5.0") function a-test:http-req(){ let $img-url := 'http://localhost:8972/static/test.png' let $http-function := function() {http:send-request(<http:request method='get' status-only='true'/>, $img-url)} let $http-s := xquery:fork-join($http-function) let $http-status := $http-s//data(@status) return <div>{$http-status}</div> };
Test: http://localhost:8972/a-test Result on Linux: 200 Result on Windows: [experr:HC0001] unknown protocol: localhost This seemed to be security issue, but tests in multiple browsers return the same results and enabling CORS doesn't help... technically we're calling from the same domain/port... but hey we tried! If we type the value of $img-url directly in the browser, we see the image on both platforms, so the issue is not with accessing the image itself, but with accessing it with the http:send-request function. -- France Baril Architecte documentaire / Documentation architect france.baril@architextus.com