http - Detecting Byte-Range requests in .NET HttpHandler -
i have httphandler checks on incoming requests , in cases perform function. 1 of conditions needs checked whether request byte-range request. how done?
you need range
header in request
object that's part of httpcontext
passed processrequest
method. there no range
property in httprequest
class, you'll have in headers
. if there range
of form:
range: bytes=<start>-<end>
where <start>
, <end>
integers. example, if wanted 64k middle of file:
range: bytes=32768-98304
you'll have parse text numbers , handle accordingly.
Comments
Post a Comment