You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What sort of problems? I don't think it should URL-encode the value since it would cause already-encoded values to get double-encoded. A routine to encode just invalid characters might work, but it seems odd to me that the browser would pass along invalid chars to Hoxy in the first place.
When that path gets through to the static file server it fails to find the file unless the spaces are URI encoded. In my case the value of fixturePath is generated (from e.g. __dirname). We ran into this problem when someone with spaces in a directory name somewhere in their structure tried to run the code in question.
Ah okay. So yeah it isn't the browser generating the URL in this case. Re-reading that code, I'm remembering now issues surrounding path differences on Windows versus other platforms. Presumably the toUrlPath() method will need to sanitize its output by escaping invalid characters.
When intercepting a request and serving a file from the local filesystem as a response, spaces in the path to that file cause problems.
This can be worked around quite easily by e.g. URI encoding the value passed to
cycle.serve
but it may be something that the method itself can do.Any thoughts? I'd be happy to get a PR open for this if necessary.
The text was updated successfully, but these errors were encountered: