java - HTTP request with range -


hey guys assignment consists in downloading video file local server using http requests, can part , want me download video segments, means requests partial (i not donwload whole file 1 request), problem i'm receveing whole file. doing wrong?

significant part of code:

socket = new socket(server, port); outputstream os = socket.getoutputstream(); os.write(("get /lifted-" + "160" + "p.dat http/1.0\r\n\r\n").getbytes()); os.write(("range: bytes="+integer.tostring(0)+"-"+integer.tostring((int) (bytedelay))).getbytes());  

a sysoutprint of range request:

range: bytes=0-1089889 

the header of http response:

last-modified: tue, 25 nov 2014 15:08:03 gmt connection: close date: fri, 05 dec 2014 21:12:31 gmt server: pygmy content-length: 54518444 (whole file) content-type: application/octet-stream 

hard say. 1 theory you're using http/1.0, predates range requests.


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -