-
Bug
-
Resolution: Done
-
Major
-
1.4.20.Final
-
None
ByteRangeHandler throws NullPointerException if Last-Modified header is missing in the response:
java.lang.NullPointerException at io.undertow.util.DateUtils.parseDate(DateUtils.java:135) at io.undertow.server.handlers.ByteRangeHandler$2.wrap(ByteRangeHandler.java:102) at io.undertow.server.handlers.ByteRangeHandler$2.wrap(ByteRangeHandler.java:91) at io.undertow.server.HttpServerExchange$WrapperStreamSinkConduitFactory.create(HttpServerExchange.java:2372) at io.undertow.server.HttpServerExchange.getResponseChannel(HttpServerExchange.java:1297) at io.undertow.servlet.spec.ServletOutputStreamImpl.writeBufferBlocking(ServletOutputStreamImpl.java:563) at io.undertow.servlet.spec.ServletOutputStreamImpl.flushInternal(ServletOutputStreamImpl.java:485) at io.undertow.servlet.spec.ServletOutputStreamImpl.flush(ServletOutputStreamImpl.java:472) at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:297) at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141) at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229) ...
RFC 7233 does not mandate the presence of Last-Modified, so the handler should simply ignore it if missing and serve the ranged response.