tweag/asterius

Path and Query String not parsed properly in Cloudflare New example/test

dacaga opened this issue · 0 comments

Describe the bug
In the cloudflare-new test, the Wai pathInfo and queryString are always showed empty for a parsed req.

To Reproduce
In test/cloudflare-new.hs, replace

callCommand "wrangler preview --headless"

by adding a URL with a path and a query string as:

callCommand "wrangler preview --headless --url http://localhost/test?test=test"

then, for the pathInfo, output it in test/cloudflare-new/Worker.hs as:

show (Wai.pathInfo req)

same goes for the queryString:

show (Wai.queryString req)

Expected behavior
We should see the properly parsed path info or query string but the return from wrangler preview is:

Your Worker responded with: 

Environment

  • OS name + version: Asterius docker image
  • Version of the code: Image ID: 502def0e956a