Re: Content-Range Problem !!

In message <Pine.BSF.4.10.9905291041580.9863-100000@elang.stts.edu>, Kid writes
:
>Is there anyone know how to use "Content-Range:" and "Range:" in the HTTP 
>version 1.1 ? Because i already write like this In Visual Basic 6. and it 
>didn't work :
>
>strcommand = "GET /index.html" + " HTTP/1.1" + vbCrLf
>strcommand = strcommand + "Host: www.stts.ac.id" 
>strcommand = strcommand + "Accept: */*" + vbCrLf
>strcommand = strcommand + "Accept: text/html" + vbCrLf
>strcommand = strcommand + "Content-Range: bytes 0-50/*" + vbCrLf
>strcommand = strcommand + vbCrLf
>
>When i invoke this program into a webserver that support HTTP 1.1, it
>still download all the content of the webpage ( not just the first 50
>bytes ). So, i need help from all of you that can help me solve my problem

That's because Content-Range is what you get in the response, not how
you request a range.  To do that, use the Range header field, like

strcommand = "GET /index.html" + " HTTP/1.1" + vbCrLf
strcommand = strcommand + "Host: www.stts.ac.id" 
strcommand = strcommand + "Accept: */*" + vbCrLf
strcommand = strcommand + "Accept: text/html" + vbCrLf
strcommand = strcommand + "Range: bytes=0-50" + vbCrLf
strcommand = strcommand + vbCrLf

....Roy

Received on Saturday, 29 May 1999 00:34:40 UTC