Fixed NPE introduced by #10618.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
parent
0981c22c33
commit
27865d29b4
|
@ -616,11 +616,11 @@ public class HttpChannelState implements HttpChannel, Components
|
|||
|
||||
try
|
||||
{
|
||||
if (!Request.getPathInContext(_request).startsWith("/") &&
|
||||
!HttpMethod.PRI.is(request.getMethod()) &&
|
||||
!HttpMethod.CONNECT.is(request.getMethod()) &&
|
||||
!HttpMethod.OPTIONS.is(request.getMethod()))
|
||||
String pathInContext = Request.getPathInContext(request);
|
||||
if (pathInContext != null && !pathInContext.startsWith("/"))
|
||||
{
|
||||
String method = request.getMethod();
|
||||
if (!HttpMethod.PRI.is(method) && !HttpMethod.CONNECT.is(method) && !HttpMethod.OPTIONS.is(method))
|
||||
throw new BadMessageException("Bad URI path");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue