Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration jetty.httpConfig.uriCompliance doesn't work #11565

Closed
chiqiu opened this issue Mar 25, 2024 · 2 comments
Closed

Configuration jetty.httpConfig.uriCompliance doesn't work #11565

chiqiu opened this issue Mar 25, 2024 · 2 comments
Labels
Bug For general bugs on Jetty side

Comments

@chiqiu
Copy link

chiqiu commented Mar 25, 2024

Jetty version(s)

12.0.6
Jetty Environment

ee10
Java version/vendor (use: java -version)
openjdk 17
OS type/version
ubuntu 22.04
Description

We have some legacy urls in our client which has a // empty segment in the request URI. We try to by pass the 400 bad request message by configuring<Set name="uriCompliance"><Call class="org.eclipse.jetty.http.UriCompliance" name="from"><Arg><Property name="jetty.httpConfig.uriCompliance" default="LEGACY"/></Arg></Call></Set>
in jetty.xml, but the exception is still thrown because when trying to create the
protected ServletApiRequest newServletApiRequest()
{
if (getHttpURI().hasViolations() && !getServletChannel().getServletContextHandler().getServletHandler().isDecodeAmbiguousURIs())
{
// TODO we should check if current compliance mode allows all the violations?

        for (UriCompliance.Violation violation : getHttpURI().getViolations())
        {
            if (UriCompliance.AMBIGUOUS_VIOLATIONS.contains(violation))
                return new ServletApiRequest.AmbiguousURI(this);
        }
    }

    return new ServletApiRequest(this);
}

It always checks if there's a violation.
How to reproduce?
Access /webapp//index.html

@chiqiu chiqiu added the Bug For general bugs on Jetty side label Mar 25, 2024
@joakime
Copy link
Contributor

joakime commented Mar 25, 2024

Duplicate of #11448

@joakime joakime marked this as a duplicate of #11448 Mar 25, 2024
@joakime joakime closed this as not planned Won't fix, can't repro, duplicate, stale Mar 25, 2024
@joakime
Copy link
Contributor

joakime commented Mar 25, 2024

Upgrade to Jetty 12.0.7, this code has already been fixed/addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
None yet
Development

No branches or pull requests

2 participants