Fix Accept header value sent by document()
This is related to #4748 but a different issue.
As far as I can see, content negotiation is broken as on
document() Saxon-JS makes HTTP requests using an
Accept: */* header. This is a catch-all value that can lead to any media type being returned.
I think there should be an explicit preference for XML formats, which can be achieved using weights.
I would suggest such a header value:
Accept: text/xml, application/xml;q=0.9, application/xhtml+xml;q=0.8, */*;q=0.7. It might be possible to improve/generalize it further. Ideally it should be configurable.
Please register to edit this issue