{
struct warc_s *w = a->format_data;
struct archive_string hdr;
+ ssize_t r;
#define MAX_HDR_SIZE 512
/* check whether warcinfo record needs outputting */
WT_INFO,
/*uri*/NULL,
/*urn*/NULL,
- /*rtm*/w->now,
- /*mtm*/w->now,
+ /*rtm*/0,
+ /*mtm*/0,
/*cty*/"application/warc-fields",
/*len*/sizeof(warcinfo) - 1U,
};
- ssize_t r;
+ wi.rtime = w->now;
+ wi.mtime = w->now;
archive_string_init(&hdr);
r = _popul_ehdr(&hdr, MAX_HDR_SIZE, wi);
if (w->typ == AE_IFREG) {
warc_essential_hdr_t rh = {
WT_RSRC,
- /*uri*/archive_entry_pathname(entry),
+ /*uri*/NULL,
/*urn*/NULL,
- /*rtm*/w->now,
- /*mtm*/archive_entry_mtime(entry),
+ /*rtm*/0,
+ /*mtm*/0,
/*cty*/NULL,
- /*len*/(size_t)archive_entry_size(entry),
+ /*len*/0,
};
ssize_t r;
+ rh.tgturi = archive_entry_pathname(entry);
+ rh.rtime = w->now;
+ rh.mtime = archive_entry_mtime(entry);
+ rh.cntlen = (size_t)archive_entry_size(entry);
archive_string_init(&hdr);
r = _popul_ehdr(&hdr, MAX_HDR_SIZE, rh);