Hi Marco,
I am not 100% sure, whether BaseX or the Java HTTP Client actually does the conversion, but it might be due to the fact, that we use the new Java HTTP Client since BaseX
10.
By default, it uses HTTP/2 where headers must be lower-case while in versions before HTTP/2 the headers are defined to be case-insensitive.
Hence, my guess is:
The conversion happens because it must in HTTP/2 while it’s valid in HTTP/1/1.1.
I hope this doesn’t cause too much trouble on your end.
Best
Michael
Von: BaseX-Talk <basex-talk-bounces@mailman.uni-konstanz.de> im Auftrag von Marco Lettere <m.lettere@gmail.com>
Datum: Mittwoch, 26. Juni 2024 um 19:14
An: basex-talk@mailman.uni-konstanz.de <basex-talk@mailman.uni-konstanz.de>
Betreff: [basex-talk] HTTP headers are all lowercase in responses
Dear all,
just by trying the example of the documentation [1] (at least since
10.4+) you should be able to verify that the response contains all
headers with lower-case names.
I think a client should not take the freedom to alter HTTP responses if
this is not strictly required. What is the concrete reason for this
behaviour?
hHanks,
Marco.
[1] http:send-request(<http:request method='get'
href='http://www.google.com' timeout='10'/>)