|
From: Mathias G. <go...@su...> - 2026-03-30 08:11:51
|
Hi existdb community, since i recently worked towards a cache in front of existdb, i wonder why there is the value "User-Agent" added to a Vary header i cannot control from Xquery. Using the response module to insert a Vary header (my hope was, i can just override with), gives me a duplicate header what is worse, because it might confuses clients. I investigated on the issue and identified the gzip compression lib added to the jetty config. And that is confusing me, because i dont see any relation by the gzip compression to a User-Agent Vary… Maybe i am on a good track and we can agree on a change here? One could also argue, that XQuery-MVC-users should be able to control the final response. For the REST- and RESTXQ-Interface, i also dont see any reason… Also i noticed that you configured existdb.org different, so the header is not present. There are some ways fixing this issue, so let us discuss about the default setting. best, Mathias setup: *docker run -p 8080:8080 existdb/existdb:6.4.1* *curl localhost:8080/exist/rest/db -l -v -o /dev/null* * Host localhost:8080 was resolved. * IPv6: ::1 * IPv4: 127.0.0.1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying [::1]:8080... * Connected to localhost (::1) port 8080 * using HTTP/1.x > GET /exist/rest/db HTTP/1.1 > Host: localhost:8080 > User-Agent: curl/8.15.0 > Accept: */* > * Request completely sent off < HTTP/1.1 200 OK < Date: Mon, 30 Mar 2026 07:29:02 GMT < Content-Type: application/xml; charset=UTF-8 < Last-Modified: Mon, 30 Mar 2026 07:28:04 GMT < Created: Mon, 30 Mar 2026 07:28:04 GMT *< Vary: Accept-Encoding, User-Agent* < Transfer-Encoding: chunked < Server: Jetty(9.4.58.v20250814) < { [485 bytes data] 100 480 0 480 0 0 102k 0 --:--:-- --:--:-- --:--:-- 117k * Connection #0 to host localhost left intact *curl localhost:8080/exist/apps/fundocs/ -l -v -o /dev/null* * Host localhost:8080 was resolved. * IPv6: ::1 * IPv4: 127.0.0.1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying [::1]:8080... * Connected to localhost (::1) port 8080 * using HTTP/1.x > GET /exist/apps/fundocs/ HTTP/1.1 > Host: localhost:8080 > User-Agent: curl/8.15.0 > Accept: */* > * Request completely sent off < HTTP/1.1 200 OK < Date: Mon, 30 Mar 2026 07:28:23 GMT < Last-Modified: Mon, 30 Mar 2026 07:28:11 GMT < Created: Mon, 30 Mar 2026 07:28:11 GMT < X-XQuery-Cached: false < Content-Type: text/html;charset=utf-8 *< Vary: Accept-Encoding, User-Agent* < Transfer-Encoding: chunked < Server: Jetty(9.4.58.v20250814) < { [11443 bytes data] 100 11437 0 11437 0 0 33554 0 --:--:-- --:--:-- --:--:-- 33638 * Connection #0 to host localhost left intact |