URL datasource sends the URL as an Object instead of a String

Description

In the and lines of Infusion the included URL Datasource sends the XHR request with a URL Object rather than as a String. It appears that browsers are able to handle this, but when trying to write tests using Sinon's fake server it throws an error: request.replace is not a function (see: https://github.com/sinonjs/nise/blob/f7ab6ec9dcb968e3a0f1d61b16f8d1176e9ba7d0/lib/fake-server/index.js#L89 )

If we look one line above : {{rCurrLoc.test(requestUrl) is returning true likely from the requestURL being implicitly having its toString method called. This lets it fall through to the failing line. However, it may fail later with other operations that may require requestURL be a String.

See conversation in the fluid-tech matrix room: https://matrix.to/#/!JcoHDrfLedPQdFhAXn:matrix.org/$3xzgv3RZdzar9HvBYfEsTDOFDPBwIc6Kbk9LA_oTci4?via=matrix.org

Environment

None

Activity

Show:
Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

Created February 3, 2021 at 2:10 PM
Updated July 22, 2024 at 2:35 PM
Resolved October 18, 2021 at 8:23 PM