Handling range requests manually on server side

40 views
Skip to first unread message

Matt Bojey

unread,
Sep 23, 2015, 3:17:51 PM9/23/15
to PDFTron WebViewer
If for some reason you need to handle requests from WebViewer manually you can find the spec for byte ranges at this link: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35.1. The examples they have are good at showing the possible values of the header. From the examples the headers that WebViewer will send will be of the form bytes=500-999 (for bytes 500-999 inclusive) or bytes=-500 (for the last 500 bytes). It won't send requests in other forms so you don't technically have to handle the other cases. You can find the spec for the Content-Range header in the response here: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.16. Again the examples they provide do a good job of showing the possible values and WebViewer will expect a 206 response code.
Reply all
Reply to author
Forward
0 new messages