Skip to content

Commit f56b3d0

Browse files
committed
[grid] prevent NPE in handling request with unsupported http method
1 parent 0219666 commit f56b3d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/src/org/openqa/selenium/netty/server/RequestConverter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ protected void channelRead0(ChannelHandlerContext ctx, HttpObject msg) throws Ex
9696
length = -1;
9797
}
9898

99-
if (msg instanceof HttpContent) {
99+
if (request != null && msg instanceof HttpContent) {
100100
ByteBuf buf = ((HttpContent) msg).content().retain();
101101
int nBytes = buf.readableBytes();
102102

0 commit comments

Comments
 (0)