Project

Profile

Help

Bug #5017

closed

Fix Accept header value sent by document()

Added by Martynas Jusevicius about 1 year ago. Updated 12 months ago.

Status:
Closed
Priority:
Normal
Category:
API
Sprint/Milestone:
-
Start date:
2021-06-03
Due date:
% Done:

100%

Estimated time:
Applies to JS Branch:
2
Fix Committed on JS Branch:
2
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

Description

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

Also available in: Atom PDF Tracking page