File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/internal Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -616,12 +616,12 @@ public void run()
616616
617617 try
618618 {
619- if (!Request .getPathInContext (_request ).startsWith ("/" ) &&
620- !HttpMethod .PRI .is (request .getMethod ()) &&
621- !HttpMethod .CONNECT .is (request .getMethod ()) &&
622- !HttpMethod .OPTIONS .is (request .getMethod ()))
619+ String pathInContext = Request .getPathInContext (request );
620+ if (pathInContext != null && !pathInContext .startsWith ("/" ))
623621 {
624- throw new BadMessageException ("Bad URI path" );
622+ String method = request .getMethod ();
623+ if (!HttpMethod .PRI .is (method ) && !HttpMethod .CONNECT .is (method ) && !HttpMethod .OPTIONS .is (method ))
624+ throw new BadMessageException ("Bad URI path" );
625625 }
626626
627627 HttpURI uri = request .getHttpURI ();
You can’t perform that action at this time.
0 commit comments