HTTP byte range request is fulfilled with binary response of whole remaining stream? #44
Description
First, the input stream is seeked from the beginning (also, note the endAt variable passed to the HTTP "Content-Range" header):
https://github.com/readium/SDKLauncher-Android/blob/develop/SDKLauncher-Android/src/org/readium/sdk/android/launcher/util/EpubServer.java#L173
PS: which in itself is wrong, because the contract of skip() is to seek from the current position, see readium/readium-sdk#103
Then, the buffered response is returned for the entire remaining length of the input stream, rather than until the aforementioned endAt boundary:
https://github.com/readium/SDKLauncher-Android/blob/develop/SDKLauncher-Android/src/fi/iki/elonen/NanoHTTPD.java#L612
This may explain the performance issues I observe when loading video/audio-containing HTML documents, although my hardware device is pretty old, so it's hard to tell.