boxlang-express 0.1.15

Released .

  • Fix: req.query/req.cookies threw a 500 on a completely ordinary input — a query param or cookie with an empty key or value (?q=, ?=cats, Cookie: name=, Cookie: =value). Request.bx sliced the string with left()/right() using a count that could legitimately be 0, which BoxLang throws on ("Count cannot be zero") — the exact bug class BodyParsers.bx already guarded against, just never applied here. Along the way, found and fixed a second issue this surfaced: a failure constructing Request/Response was caught silently in HttpBridge.bx — no server-side log line, and the real error message was hidden from the response even with app.set("env", "development") on, unlike every other error path in the framework. It now logs and honors env the same way route/middleware errors already do.
  • Fix: a Range request header of exactly bytes= (a valid header, just an empty spec) also threw a 500 — same left()/right() zero-count bug, this time in RangeParser.bx, whose own dash-split logic already used mid() specifically to avoid it. Now falls back to a full 200 response, same as any other unparseable Range header.
  • Fix: a sweep of the rest of the codebase for the same left()/right() zero-count bug turned up six more, all in Multipart.bx — the most reachable one being a plain HTML file input submitted with nothing selected (filename=""), which crashed the whole upload instead of the field simply being empty, same as it already was for a text field. Also fixed: an empty boundary= in Content-Type, a multipart part with no headers or an empty body (a genuinely empty file/field), and a part header with an empty name or value. All converted to mid(), same fix shape as RangeParser.bx above.
  • Fix: a bare : path segment (app.get("/:", ...)) — a typo for :name — threw the same left()/right() zero-count error, but at route registration time rather than per-request, so it's a developer papercut rather than anything reachable by a client. Fixed the same way, but also given a proper BoxExpress.InvalidRoutePath message (matching every sibling validation in Router.bx) instead of leaking a raw "Count cannot be zero." engine error with no indication of what was actually wrong.
  • Fix: listen() created its underlying HttpServer with a TCP accept backlog of 0 (the JDK default), which turned out to be a real capacity ceiling — confirmed with a live load test (ab): request handling itself stayed fast and error-free throughout, but new connections started getting refused with a reset once concurrency passed roughly 65-70 in repeated runs. listen(port, callback, { backlog: n }) now defaults to 1024, which pushed the same test past 150 with no other change. See BoxExpress.bx.