Build environment: macOS
Moddable SDK version: 9.5.0
Target device: desktop simulator
Description
In examples/io/listener/listen, query parameters are missing from request.url.
Steps to Reproduce
- run
examples/io/listener/listen
- send request
curl 'http://localhost/query?text=hello'
Expected behavior
request.url.searchParams.get("text") returns "hello".
Actual: It returns null, and request.url.search is empty.
Other information
The HTTP server separates the request target into path and query, but listen.js constructs the URL using only path:
https://github.com/Moddable-OpenSource/moddable/blob/public/examples/io/listener/listen/listen.js#L154-L155
Build environment: macOS
Moddable SDK version: 9.5.0
Target device: desktop simulator
Description
In
examples/io/listener/listen, query parameters are missing from request.url.Steps to Reproduce
examples/io/listener/listencurl 'http://localhost/query?text=hello'Expected behavior
request.url.searchParams.get("text") returns "hello".
Actual: It returns null, and request.url.search is empty.
Other information
The HTTP server separates the request target into path and query, but listen.js constructs the URL using only path:
https://github.com/Moddable-OpenSource/moddable/blob/public/examples/io/listener/listen/listen.js#L154-L155