allthingssecurity commented on PR #29039:
URL: https://github.com/apache/camel/pull/29039#issuecomment-6597525164

   Thanks for the careful review.
   
   1. Fixed here in 6b1835719265. When the static path is exact, 
`CamelPathTemplateHandler` now sends a request that no template matches to the 
fallback, so the answer is the same as without the template route. 
`CamelRootHandler` marks the static path as exact wherever it registers the 
exact path (in either start order), and clears the mark when it removes that 
registration. A `matchOnUriPrefix` static path still answers what no template 
matches. There are 2 new tests in `UndertowTemplatePathAndStaticPathTest`:
      - `/orders/a/b` (template route first) and `/shop/a/b` (static route 
first) get 404, also after the static route restarts;
      - `/m/a/b` gets 404 instead of the 405 of `/m`.
   
      With the handlers from before this commit, both tests fail (`/orders/a/b` 
gets 200 and `/m/a/b` gets 405). With the fix the class passes 20 times out of 
20, and the module has 271 tests, 0 failures.
   2. Added to the upgrade guide: the 404 for a deeper path, and how to keep 
the old behaviour (drop the static route of the base path, and the template 
route alone serves it).
   3. Agreed, a template route alone answering `/orders` with an empty `id` is 
inconsistent with the rest-dsl matcher. I've listed it under "Not changed" and 
we'll file a follow-up JIRA.
   
   _Claude Code on behalf of allthingssecurity_
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to