You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
javascript: a '/…' string inside one chained route link's arguments becomes the next link's path, shifting every later link's verb and line #1731
Symptom: in a chained registration, a '/…' string written inside one link's arguments (a redirect in an inline handler, a middleware option) is read as the NEXT link's path. From there each later link carries the previous link's verb, path and line.
impact createPost → registered as a GET route "/posts" at :10. impact editPost → POST route "/posts" at :11. path '*' createPost → calls it at :10.
Second instance: .post('/orders', validate({ onFail: '/orders/new' }), createOrder) followed by .delete('/orders/:id', removeOrder) → impact removeOrder says POST route "/orders" at the POST line.
Expected: POST "/posts" :11, PATCH "/posts/:id" :12, DELETE "/orders/:id". A link's path is the first argument of its own call.
Already fixed on the latest 0.1.8 by #1747: a route link now reads its path from its own argument list in the source, so a '/…' string inside a handler or a middleware option is no longer taken as the next link's path.
Repro (both instances from this issue, in one Express router file):
$ axiomcode impact createPost --kind method → registered as a POST route "/posts" src/routes.js:15
$ axiomcode impact editPost --kind method → registered as a PATCH route "/posts/:id" src/routes.js:16
$ axiomcode impact removeOrder --kind method → registered as a DELETE route "/orders/:id" src/routes.js:18
$ axiomcode path '*' createPost → calls it at :15
The same 7 checks (these plus the controls listPosts :14, createOrder :17, listTags :19) all pass on 0.1.8. With ax_registration.py from before #1747, 5 of the 7 fail.
This issue now tracks 2 related issues about JavaScript route chains and HTTP client request shapes (#1732, #1758). Those issues are closed as duplicates of this one; each keeps its own description and reproduction. The group is fixed together in one change, and this issue closes when that change reaches the release branch.
Activity
swapnilpaliwal-sd commentedon Sep 29, 2026
Already fixed on the latest 0.1.8 by #1747: a route link now reads its path from its own argument list in the source, so a
'/…'string inside a handler or a middleware option is no longer taken as the next link's path.Repro (both instances from this issue, in one Express router file):
Latest 0.1.8:
The same 7 checks (these plus the controls listPosts :14, createOrder :17, listTags :19) all pass on 0.1.8. With
ax_registration.pyfrom before #1747, 5 of the 7 fail.swapnilpaliwal-sd commentedon Sep 29, 2026
This issue now tracks 2 related issues about JavaScript route chains and HTTP client request shapes (#1732, #1758). Those issues are closed as duplicates of this one; each keeps its own description and reproduction. The group is fixed together in one change, and this issue closes when that change reaches the release branch.