GNOME Bugzilla – Bug 534144
xsltproc does not send HTTP Accept header
Last modified: 2021-07-05 13:22:11 UTC
When an application requests a file from an HTTP server, it can specify which type(s) of file it can accept. This is achieved through the HTTP Accept header. A client supplying an HTTP Accept header is a simple form of content negotiation: if the client accepts only content of a particular MIME-type, the server may be able to adjust the document to match. When processing a document with src URI prefix "http", xsltproc fetches the document from the corresponding HTTP server. However, when it does this, it sends no Accept header as part of its request (tested with Debian xsltproc 1.1.19-1). Although xsltproc requires the content it receives to be XML, it does not mention this to the server. It would be nice if xsltproc were to support setting the MIME type via the HTTP Accept header. This could be either an optional feature, disabled by default, to be backwards compatible, but even enabling it by default should work on well-configured servers. My limited knowledge of MIME suggests that "application/xml" would be the correct MIME type for xsltproc to use. Cheers, Paul.
Loading files via HTTP is handled by libxml2.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/libxml2/-/issues/ Thank you for your understanding and your help.