NPE protect DefaultServlet iteration through request fields
This commit is contained in:
parent
ec79a6f88e
commit
6a6c8bacda
|
@ -716,6 +716,8 @@ public class DefaultServlet extends HttpServlet implements ResourceFactory
|
||||||
for (int i=fields.size();i-->0;)
|
for (int i=fields.size();i-->0;)
|
||||||
{
|
{
|
||||||
HttpField field=fields.getField(i);
|
HttpField field=fields.getField(i);
|
||||||
|
if (field.getHeader() != null)
|
||||||
|
{
|
||||||
switch (field.getHeader())
|
switch (field.getHeader())
|
||||||
{
|
{
|
||||||
case IF_MATCH:
|
case IF_MATCH:
|
||||||
|
@ -734,6 +736,7 @@ public class DefaultServlet extends HttpServlet implements ResourceFactory
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ifm=request.getHeader(HttpHeader.IF_MATCH.asString());
|
ifm=request.getHeader(HttpHeader.IF_MATCH.asString());
|
||||||
|
|
Loading…
Reference in New Issue