Skip to content

Commit

Permalink
Update jetty-http/src/main/java/org/eclipse/jetty/http/HttpURI.java
Browse files Browse the repository at this point in the history
  • Loading branch information
gregw committed Jun 10, 2021
1 parent 339e245 commit 26d1646
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jetty-http/src/main/java/org/eclipse/jetty/http/HttpURI.java
Expand Up @@ -1328,7 +1328,10 @@ else if (_path != null)
*/
private void checkSegment(String uri, int segment, int end, boolean param)
{
// If we have previously seen an empty segment, then it was not the last segment and was thus ambiguous.
// This method is called once for every segment parsed.
// A URI like "/foo/" has two segments: "foo" and an empty segment.
// Empty segments are only ambiguous if they are not the last segment
// So if this method is called for any segment and we have previously seen an empty segment, then it was ambiguous
if (_emptySegment)
_ambiguous.add(Ambiguous.EMPTY);

Expand Down

0 comments on commit 26d1646

Please sign in to comment.