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
|
try
|
||||||
{
|
{
|
||||||
if (!Request.getPathInContext(_request).startsWith("/") &&
|
String pathInContext = Request.getPathInContext(request);
|
||||||
!HttpMethod.PRI.is(request.getMethod()) &&
|
if (pathInContext != null && !pathInContext.startsWith("/"))
|
||||||
!HttpMethod.CONNECT.is(request.getMethod()) &&
|
|
||||||
!HttpMethod.OPTIONS.is(request.getMethod()))
|
|
||||||
{
|
{
|
||||||
|
String method = request.getMethod();
|
||||||
|
if (!HttpMethod.PRI.is(method) && !HttpMethod.CONNECT.is(method) && !HttpMethod.OPTIONS.is(method))
|
||||||
throw new BadMessageException("Bad URI path");
|
throw new BadMessageException("Bad URI path");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue