mirror of
https://github.com/mirror/wget.git
synced 2025-01-07 19:00:30 +08:00
[svn] Ignore trailing whitespace in header_extract_number.
Published in <sxsheruo5gn.fsf@florida.arsdigita.de>.
This commit is contained in:
parent
3d9dda6485
commit
1a96dcfcb8
@ -1,3 +1,7 @@
|
|||||||
|
2001-11-16 Hrvoje Niksic <hniksic@arsdigita.com>
|
||||||
|
|
||||||
|
* headers.c (header_extract_number): Ignore trailing whitespace.
|
||||||
|
|
||||||
2001-08-24 Ian Abbott <abbotti@mev.co.uk>
|
2001-08-24 Ian Abbott <abbotti@mev.co.uk>
|
||||||
|
|
||||||
* html-url.c (collect_tags_mapper): Fix bug converting links
|
* html-url.c (collect_tags_mapper): Fix bug converting links
|
||||||
|
@ -149,6 +149,15 @@ header_extract_number (const char *header, void *closure)
|
|||||||
|
|
||||||
for (result = 0; ISDIGIT (*p); p++)
|
for (result = 0; ISDIGIT (*p); p++)
|
||||||
result = 10 * result + (*p - '0');
|
result = 10 * result + (*p - '0');
|
||||||
|
|
||||||
|
/* Failure if no number present. */
|
||||||
|
if (p == header)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* Skip trailing whitespace. */
|
||||||
|
p += skip_lws (p);
|
||||||
|
|
||||||
|
/* Indicate failure if trailing garbage is present. */
|
||||||
if (*p)
|
if (*p)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user