mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
warc: fix format string for off_t
This commit is contained in:
parent
4f09a3118f
commit
1e229375aa
@ -1,3 +1,8 @@
|
|||||||
|
2012-11-24 Giuseppe Scrivano <gscrivano@gnu.org>
|
||||||
|
|
||||||
|
* warc.c (warc_write_block_from_file): Use `number_to_string' to
|
||||||
|
convert the content-length to a string.
|
||||||
|
|
||||||
2012-11-15 Giuseppe Scrivano <gscrivano@gnu.org>
|
2012-11-15 Giuseppe Scrivano <gscrivano@gnu.org>
|
||||||
|
|
||||||
* retr.c (write_data): Fix comment.
|
* retr.c (write_data): Fix comment.
|
||||||
|
@ -245,15 +245,10 @@ static bool
|
|||||||
warc_write_block_from_file (FILE *data_in)
|
warc_write_block_from_file (FILE *data_in)
|
||||||
{
|
{
|
||||||
/* Add the Content-Length header. */
|
/* Add the Content-Length header. */
|
||||||
char *content_length;
|
char content_length[22];
|
||||||
fseeko (data_in, 0L, SEEK_END);
|
fseeko (data_in, 0L, SEEK_END);
|
||||||
if (! asprintf (&content_length, "%ld", ftello (data_in)))
|
number_to_string (content_length, ftello (data_in));
|
||||||
{
|
|
||||||
warc_write_ok = false;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
warc_write_header ("Content-Length", content_length);
|
warc_write_header ("Content-Length", content_length);
|
||||||
free (content_length);
|
|
||||||
|
|
||||||
/* End of the WARC header section. */
|
/* End of the WARC header section. */
|
||||||
warc_write_string ("\r\n");
|
warc_write_string ("\r\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user