W3C home > Mailing lists > Public > ietf-http-wg-old@w3.org > May to August 1999

Re: Content-Range Problem !!

From: Roy T. Fielding <fielding@kiwi.ics.uci.edu>
Date: Sat, 29 May 1999 00:28:08 -0700
To: Kid <ronw@elang.stts.ac.id>
cc: http-wg@cuckoo.hpl.hp.com
Message-ID: <9905290028.aa24436@paris.ics.uci.edu>
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 08:31:37 EDT

This archive was generated by hypermail pre-2.1.9 : Wednesday, 24 September 2003 06:33:31 EDT