W3C home > Mailing lists > Public > www-lib@w3.org > January to March 2003

RE: HTFTP: Support for resuming downloads with "REST" [patch]

From: Sinha, Raj (Raj) <rajsinha@avaya.com>
Date: Fri, 14 Mar 2003 11:39:05 -0500
Message-ID: <8CA1128D59AD27429985B397118CEDDF019E3085@nj7460avexu1.global.avaya.com>
To: "Tim Serong" <tim.serong@conceiva.com>, <richard@list03.atterer.net>
Cc: <www-lib@w3.org>
Hi All
I am sorry i did not catch the full discussion. But there is a discussion for our project to use libwww for downloading code into our embedded devices. 
Can you please provide me the best possible way to do this. What modules should i look into it. They want to usee http. can we take care of broken downloads and other such issues.
i will apreciate any help. i am sorry but i dont have any more details. its in very preliminary stages

	-----Original Message----- 
	From: Tim Serong [mailto:tim.serong@conceiva.com] 
	Sent: Thu 3/13/2003 8:12 PM 
	To: richard@list03.atterer.net 
	Cc: www-lib@w3.org 
	Subject: Re: HTFTP: Support for resuming downloads with "REST" [patch]

	Hello Richard,
	I found a small bug in the "REST" patch.  If I try to start at an offset
	where the first digit is non-zero and every other digit is zero (ie:
	100, 1000 etc.) it won't do the REST.  Here's the relevant code:
	  s = rangeVal;
	  if (*s < '0' || *s > '9') break;
	  while (*++s >= '0' && *s <= '9') len += *s - '0';
	  if (*s != '-' || s[1] != '\0' || len == 0) break;
	The problem is, 's' is incremented before the first digit is added to
	'len', so if all the remaining digits are zero, it'll just break out of
	the loop.  This can be fixed by changing the 'while' line to the
	  while (*s >= '0' && *s <= '9') len += *s++ - '0';
	Tim Serong


Received on Friday, 14 March 2003 11:39:12 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:55 UTC