#1041 HTTP wildcard handlers receive truncated path when http_paths is used

Reporter MattJ
Owner Nobody
Stars ★★ (2)
  • Priority-High
  • Type-Defect
  • Milestone-0.10
  • Status-NeedInfo
  1. MattJ on

    1. Set http_paths = { some_module = "/foo" } 2. In some_module, have a HTTP wildcard handler 3. Observe that when a request is made, the wildcard handler receives a truncated path as its second parameter In mod_http.lua at line 109 in revision 34814a908557, the path:sub() call can be incorrect in configurations where the module's base path has been overridden in the config file.

  2. Zash on

    Given a mod_some_module like below, it seems to be working fine, both on 0.10 and trunk. How do you reproduce? ``` module:depends("http"); module:provides("http", { route = { ["GET /bar/*"] = function (event,path) return "Hello, " .. path end; } }); ```

    • tags Status-NeedInfo
  3. MattJ on

    You're right, I also failed to reproduce it so far. For the record, here is the original configuration that led to this: https://prosody.im/pastebin/2e19dc2d-3bc6-441b-94e8-d758180e123f

  4. Zash on

    So, 6 months and nothing new. Close?

New comment

Not published. Used for spam prevention and optional update notifications.