cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Wrong size of a file when downloading

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 24 Jun 2009 10:31:08 +0200 (CEST)

On Wed, 24 Jun 2009, JAIME DURAN RODRIGUEZ wrote:

>> No commas and no aditional "bytes". We could possibly let the curl parser
>> just ignore special characters in the middle of the number (the comma) but
>> I'm not at all convinced that is a very good idea in general.
>
> Well, since we can't divide a byte (i.e. is impossible to have decimals in
> the SIZE response) maybe ignoring commas or even dots is not a bad idea.

Yeah, possibly. It's just... error prone and may very well lead to further
problems and not that easily understood side-effects.

For example, how can we tell that the digits following a non-digit letter is a
continuation of the number and not simply stray info? Comma happens to be an
english separator for thousands, but other languages have other separators. In
Swedish they're separated by space, like "37 000". This is opening a can of
worms. I rather stay out of it.

> Could modify the parser myself to fix it locally?

Sure, nobody is going to stop you!

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2009-06-24