Open justparking opened 5 months ago
This was experienced when trying to host a MP4 video file.
When using Chrome, it automatically uses this Range: bytes=0- header which seems to trip up Nodel HTTP server.
Range: bytes=0-
It returns a misleading error code 404 NOT FOUND but looking deeper in the code, it's actually supposed to return INTERNAL ERROR: 'range' not supported in this context. (related code https://github.com/museumsvictoria/nodel/blob/e0e6500dc576088a84fc619fad9fdc3243f7bd52/nodel-framework/src/main/java/org/nanohttpd/protocols/http/NanoHTTPD.java#L893)
404 NOT FOUND
INTERNAL ERROR: 'range' not supported in this context.
Nodel definitely has code to support (even partially support) the Range header - doco.
Range
I presume browsers make use it to provide file seeking which is different to other content types.
I'm not sure if there was a particular reason why Range was specifically being ignored.
I tested removing that check and it works fine but I need to check for other side-effects.
This was experienced when trying to host a MP4 video file.
When using Chrome, it automatically uses this
Range: bytes=0-
header which seems to trip up Nodel HTTP server.It returns a misleading error code
404 NOT FOUND
but looking deeper in the code, it's actually supposed to returnINTERNAL ERROR: 'range' not supported in this context.
(related code https://github.com/museumsvictoria/nodel/blob/e0e6500dc576088a84fc619fad9fdc3243f7bd52/nodel-framework/src/main/java/org/nanohttpd/protocols/http/NanoHTTPD.java#L893)Nodel definitely has code to support (even partially support) the
Range
header - doco.I presume browsers make use it to provide file seeking which is different to other content types.
I'm not sure if there was a particular reason why
Range
was specifically being ignored.I tested removing that check and it works fine but I need to check for other side-effects.