Saxon-JS: In Safari, 404 responses don't make it to the handler
I'm doing an http-request of status-only="true" to see if a resource already exists or not and need to take different actions depending on the result. If the resource doesn't already exist, I know I'll get a 404. In Firefox, my handler is invoked as expected and ?status tells me I got the 404. In Safari (12.0.3 on macOS), my handler is never invoked. Instead, I see an error on the browser's developer console with the message "Failed to load resource: the server responded with a status of 404 ()" and the url of the resource I was checking. It does not link in any way to the Saxon-JS file. It seems to be happening at a lower level than that. Any advice?
RE: Saxon-JS: In Safari, 404 responses don't make it to the handler - Added by David Cramer over 1 year ago
I've come upon a solution: Wrapping the ixsl:schedule-action in an xsl:try (just with an empty xsl:catch/) avoids the problem. Perhaps there are changes you can make to Saxon-JS to work around this odd behavior on Safari's part (and perhaps logging a bug against Safari is in order), but at least I can get this thing working right now.
RE: Saxon-JS: In Safari, 404 responses don't make it to the handler - Added by Debbie Lockett over 1 year ago
Thanks for letting us know about the issue. Good to hear that you have found a work around! I will look into whether there is more we can do in Saxon-JS.
Please register to reply