boxlang-express 0.1.20
Released .
- Fix:
Router.bxreconstructsreq.pathforapp.use()-mounted middleware/sub-routers from segments produced by splitting on/, which drops empty segments — so a trailing slash on the incoming path left no trace once rejoined. Since nearly every request passes through at least oneapp.use()layer (even one mounted at root/), this silently stripped trailing slashes fromreq.patheverywhere downstream, breaking anything that distinguishes/foo/from/foo— notablyboxExpressStatic()'s directory-index resolution (/foo/→/foo/index.html). Now reattached from the pre-mutation path string, the only place that still has it by the time the remainder is computed. See Router.bx. - Static file serving now mirrors
express.static(): a request for a directory without the trailing slash (/games/void-harvest) redirects (301) to the slash-suffixed URL instead of 404ing — the slash version is the canonical one, since relative asset links inside the served HTML only resolve correctly against it. The redirect target is built fromreq.originalUrlrather thanreq.path, since this middleware commonly runs after a mount prefix has already been stripped fromreq.pathbyRouter.bx, butoriginalUrlis captured once at request construction and never mutated by that stripping. See StaticFiles.bx.