1
0
mirror of https://github.com/mirror/wget.git synced 2025-04-24 12:10:16 +08:00

* src/warc.c: Use warc_write_header_uri for all WARC-Target-URI fields

The WARC spec requires that all URIs be enclosed in angle brackets. This
was being done in most cases, but not for "WARC-Target-URI" fields in
WARC blocks of type "response", "resource", "revisit", and "metadata".
This commit is contained in:
Benjamin Esham 2017-03-03 08:55:48 -05:00 committed by Tim Rühsen
parent ac4fed3220
commit 63c2aea255

View File

@ -1413,7 +1413,7 @@ warc_write_revisit_record (const char *url, const char *timestamp_str,
warc_write_header ("WARC-Refers-To", refers_to);
warc_write_header ("WARC-Profile", "http://netpreserve.org/warc/1.0/revisit/identical-payload-digest");
warc_write_header ("WARC-Truncated", "length");
warc_write_header ("WARC-Target-URI", url);
warc_write_header_uri ("WARC-Target-URI", url);
warc_write_date_header (timestamp_str);
warc_write_ip_header (ip);
warc_write_header ("Content-Type", "application/http;msgtype=response");
@ -1505,7 +1505,7 @@ warc_write_response_record (const char *url, const char *timestamp_str,
warc_write_header ("WARC-Record-ID", response_uuid);
warc_write_header ("WARC-Warcinfo-ID", warc_current_warcinfo_uuid_str);
warc_write_header ("WARC-Concurrent-To", concurrent_to_uuid);
warc_write_header ("WARC-Target-URI", url);
warc_write_header_uri ("WARC-Target-URI", url);
warc_write_date_header (timestamp_str);
warc_write_ip_header (ip);
warc_write_header ("WARC-Block-Digest", block_digest);
@ -1562,7 +1562,7 @@ warc_write_record (const char *record_type, const char *resource_uuid,
warc_write_header ("WARC-Record-ID", resource_uuid);
warc_write_header ("WARC-Warcinfo-ID", warc_current_warcinfo_uuid_str);
warc_write_header ("WARC-Concurrent-To", concurrent_to_uuid);
warc_write_header ("WARC-Target-URI", url);
warc_write_header_uri ("WARC-Target-URI", url);
warc_write_date_header (timestamp_str);
warc_write_ip_header (ip);
warc_write_digest_headers (body, payload_offset);