jetty / jetty.project

Eclipse Jetty® - Web Container & Clients - supports HTTP/2, HTTP/1.1, HTTP/1.0, websocket, servlets, and more
https://eclipse.dev/jetty
Other
3.84k stars 1.91k forks source link

HttpURI.Mutable path changes should clear out any existing path violations before parsing the new path. #12306

Open joakime opened 3 days ago

joakime commented 3 days ago

The use of HttpURI.Mutable methods that change the path (eg .path(String) and .pathQuery(String)) should clear out any existing path violations before parsing the newly provided path.

This helps CompactPathRule to also clear out the path violations that the CompactPathRule is capable of addressing.

Updating CompactPathRuleTest testcase to show these new behaviors.

Fixes: #11298