FLUID-6460: Incorrect quoting when transferring resource loader options to XHR

Metadata

Source
FLUID-6460
Type
Bug
Priority
Major
Status
Reopened
Resolution
N/A
Assignee
Antranig Basman
Reporter
Antranig Basman
Created
2020-02-28T13:39:56.175-0500
Updated
2021-06-21T11:36:53.260-0400
Versions
N/A
Fixed Versions
N/A
Component
  1. ResourceLoader

Description

This bug only affects the in-progress FLUID-6148 branch. As a part of the refactoring removing jQuery AJAX from the ResourceLoader's dependencies, a branch was added to allow those few peculiar options which must be applied directly as properties to the raw XHR object ("contentType", "responseType", "timeout") rather than supplied as options to be passed through from the resource's options.

Unfortunately these were quoted incorrectly in the following implementation resulting in nothing being transferred:

fluid.resourceLoader.loaders.XHR.copyProps.forEach(function (prop) {
            if (fluid.isValue(options.prop)) {
                xhr[prop] = options.prop;
            }
        });

We should quote these correctly and add at least some "white-box" tests for this.