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

Reporter MattJ
Owner Nobody
Created
Updated
Stars ★★ (3)
Tags
  • Milestone-0.10
  • Type-Defect
  • Priority-High
  • Status-CantReproduce
  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; } }); ```

    Changes
    • 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?

  5. sven222 on

    I did the installation word by word with the documentation you link to for version 0.11 https://homebrewserver.club/configuring-a-modern-xmpp-server.html It did work on a "nacked" debian a few weeks ago, more or less directly after you released 0.11. Everything workes smooth. Now I get the error. Only if I do a complete new installation. I checked on of my productive servers, the renew of certificates did work smooth, even if I use a multiple domain certificate there. Just if I install new. blabla from homebrewserver.club could reproduce the issue, that is why they changed the documentation to singel certificate files. I did not change nothing in the prosody.cfg.lua beside changing info to debug.

  6. sven222 on

    Sorry comment to wrong issue. Can somebody delete?

  7. Zash on

    Closing. Can reopen if someone figures out how to reproduce.

    Changes
    • tags Status-CantReproduce

New comment

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