Handling range requests manually on server side

已查看 42 次
跳至第一个未读帖子

Matt Bojey

未读,
2015年9月23日 15:17:512015/9/23
收件人 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.
回复全部
回复作者
转发
0 个新帖子