Project

Profile

Help

Feature #4748

closed

Option to supply Accept header in SaxonJS.getResource()

Added by Martynas Jusevicius about 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Sprint/Milestone:
-
Start date:
2020-09-23
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

I am trying to load an application/rdf+xml resource using SaxonJS.getResource() yet I get text/html, because Saxon-JS sends an Accept: */* header.

I think there should be an option to supply the Accept header.

Actions #1

Updated by Norm Tovey-Walsh almost 4 years ago

  • Status changed from New to Resolved

I believe this is now implemented.

Actions #2

Updated by Community Admin almost 4 years ago

  • Applies to JS Branch 2 added
  • Applies to JS Branch deleted (2.0)
Actions #3

Updated by Debbie Lockett over 3 years ago

  • Fix Committed on JS Branch 2 added
Actions #4

Updated by Debbie Lockett over 3 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in JS Release set to Saxon-JS 2.1

Bug fix applied in the Saxon-JS 2.1 maintenance release.

Actions #5

Updated by Debbie Lockett over 3 years ago

  • Status changed from Closed to In Progress
  • Assignee set to Debbie Lockett

Reopening, because the fix looks to be incomplete. SaxonJS.getResource calls platform.resourcePromise; in NodeJSPlatform this method processes headers if supplied, but not in BrowserPlatform.

The browser test iss4748 is actually testing the use of headers in ixsl:schedule-action/@http-request; which is a separate mechanism.

Actions #6

Updated by Debbie Lockett over 3 years ago

New test iss4748b added. Committed code changes to implement headers option for SaxonJS.getResource, for browser as well as Node platforms.

Also need to update the documentation.

Actions #7

Updated by Debbie Lockett over 3 years ago

  • Status changed from In Progress to Resolved

Documentation now updated to include the new headers option for SaxonJS.getResource.

We should really have more tests for this new feature, and for testing SaxonJS.getResource in general. But I'm going to mark this as resolved anyway.

Actions #8

Updated by Debbie Lockett over 3 years ago

  • Fixed in JS Release deleted (Saxon-JS 2.1)
Actions #9

Updated by Debbie Lockett over 3 years ago

  • Fixed in JS Release set to Saxon-JS 2.3

Bug fix applied in the Saxon-JS 2.3 maintenance release.

Actions #10

Updated by Debbie Lockett over 3 years ago

  • Status changed from Resolved to Closed

Please register to edit this issue

Also available in: Atom PDF Tracking page