Fix RfcUriParser parsing for single char fragments

Prior to this commit, the `RfcUriParser` would ignore URI fragments if
their length is < 2. This commit fixes the length check to allow for
single char fragments when parsing URIs.

Fixes gh-36029
This commit is contained in:
Brian Clozel
2025-12-17 09:51:53 +01:00
parent c0e8a36592
commit 91a0c28fa9
2 changed files with 10 additions and 1 deletions
@@ -563,7 +563,7 @@ abstract class RfcUriParser {
}
public void captureFragmentIfNotEmpty() {
if (this.index > this.componentIndex + 1) {
if (this.index > this.componentIndex) {
this.fragment = captureComponent("fragment");
}
}