Search: 
Knowledge Base Entry

How can I do a partial download with HTTP?

Date Entered:  03/04/2000

Last Update:  04/23/2008

APPLIES TO

SYNOPSIS

How can I do a partial download with HTTP?

SOLUTION

The HTTP/1.1 provides support for partial downloads. (Section 14.36 of RFC 2068) To partially download a file you should specify the byte range in the Range property.


     'the actual byte range
     HTTP1.Range = "0-499" 'get only the first 500 bytes
     HTTP1.Get URL

The format of the Range property consits of a range of bytes specified by two numbers separated by '-' (e.g. "0-499") For example: First 500 bytes 0-499 Second 500 bytes 500-999 Final 500 bytes -500

Older versions of IP*Works! do not contain a Range property and must use the OtherHeader property to manually set this header, as well as setting the HTTP/1.1 protocol in the HTTPVersion property.

| About | Privacy Policy | Terms of Use |
© Copyright 2010 /n software inc.