HTTP Header Vary: User-Agent
Mathias Göbel <[email protected]> Mon, 30 Mar 2026 09:39:18 +0200
| Newsgroups | gmane.text.xml.exist |
|---|---|
| Message-ID | <[email protected]> |
--===============4674567998424695879==
Content-Type: multipart/alternative;
boundary="------------ssUx20bGfiCSyJ0vfqAXMJsz"
Content-Language: en-US
--------------ssUx20bGfiCSyJ0vfqAXMJsz
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: 8bit
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
--------------ssUx20bGfiCSyJ0vfqAXMJsz
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: 8bit
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi existdb community,</p>
<p>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…</p>
<p>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…</p>
<p>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.</p>
<p>best,<br>
Mathias</p>
<p><br>
</p>
<p>setup:</p>
<blockquote>
<p><font face="monospace"><font size="4"><b>docker run -p
8080:8080 existdb/existdb:6.4.1</b></font></font></p>
<p><font face="monospace"><font size="4"><b>curl
localhost:8080/exist/rest/db -l -v -o /dev/null</b></font><br>
* Host localhost:8080 was resolved.<br>
* IPv6: ::1<br>
* IPv4: 127.0.0.1<br>
% Total % Received % Xferd Average Speed Time Time
Time Current<br>
Dload Upload Total
Spent Left Speed<br>
0 0 0 0 0 0 0 0 --:--:--
--:--:-- --:--:-- 0* Trying [::1]:8080...<br>
* Connected to localhost (::1) port 8080<br>
* using HTTP/1.x<br>
> GET /exist/rest/db HTTP/1.1<br>
> Host: localhost:8080<br>
> User-Agent: curl/8.15.0<br>
> Accept: */*<br>
> <br>
* Request completely sent off<br>
< HTTP/1.1 200 OK<br>
< Date: Mon, 30 Mar 2026 07:29:02 GMT<br>
< Content-Type: application/xml; charset=UTF-8<br>
< Last-Modified: Mon, 30 Mar 2026 07:28:04 GMT<br>
< Created: Mon, 30 Mar 2026 07:28:04 GMT<br>
<b>< Vary: Accept-Encoding, <font color="#c01c28">User-Agent</font></b><br>
< Transfer-Encoding: chunked<br>
< Server: Jetty(9.4.58.v20250814)<br>
< <br>
{ [485 bytes data]<br>
100 480 0 480 0 0 102k 0 --:--:--
--:--:-- --:--:-- 117k<br>
* Connection #0 to host localhost left intact<br>
</font></p>
<p><font face="monospace"><b><font size="4">curl
localhost:8080/exist/apps/fundocs/ -l -v -o /dev/null</font></b><br>
* Host localhost:8080 was resolved.<br>
* IPv6: ::1<br>
* IPv4: 127.0.0.1<br>
% Total % Received % Xferd Average Speed Time Time
Time Current<br>
Dload Upload Total
Spent Left Speed<br>
0 0 0 0 0 0 0 0 --:--:--
--:--:-- --:--:-- 0* Trying [::1]:8080...<br>
* Connected to localhost (::1) port 8080<br>
* using HTTP/1.x<br>
> GET /exist/apps/fundocs/ HTTP/1.1<br>
> Host: localhost:8080<br>
> User-Agent: curl/8.15.0<br>
> Accept: */*<br>
> <br>
* Request completely sent off<br>
< HTTP/1.1 200 OK<br>
< Date: Mon, 30 Mar 2026 07:28:23 GMT<br>
< Last-Modified: Mon, 30 Mar 2026 07:28:11 GMT<br>
< Created: Mon, 30 Mar 2026 07:28:11 GMT<br>
< X-XQuery-Cached: false<br>
< Content-Type: text/html;charset=utf-8<br>
<b>< Vary: Accept-Encoding, <font color="#c01c28">User-Agent</font></b><br>
< Transfer-Encoding: chunked<br>
< Server: Jetty(9.4.58.v20250814)<br>
< <br>
{ [11443 bytes data]<br>
100 11437 0 11437 0 0 33554 0 --:--:--
--:--:-- --:--:-- 33638<br>
* Connection #0 to host localhost left intact</font></p>
</blockquote>
</body>
</html>
--------------ssUx20bGfiCSyJ0vfqAXMJsz--
--===============4674567998424695879==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============4674567998424695879==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Exist-open mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/exist-open
--===============4674567998424695879==--