@@ -989,6 +989,7 @@ warc_write_warcinfo_record (const char *filename)
989
989
FILE * warc_tmp ;
990
990
char timestamp [22 ];
991
991
char * filename_basename ;
992
+ int i ;
992
993
993
994
/* Write warc-info record as the first record of the file. */
994
995
/* We add the record id of this info record to the other records in the
@@ -1015,17 +1016,39 @@ warc_write_warcinfo_record (const char *filename)
1015
1016
return false;
1016
1017
}
1017
1018
1018
- if (fprintf (warc_tmp , "software: Wget/%s (%s)\r\n" , version_string , OS_TYPE ) < 0
1019
+ if (fprintf (warc_tmp , "operator: Archive Team <archiveteam@archiveteam.org>\r\n" ) < 0
1020
+ || fprintf (warc_tmp , "software: Wget/%s (%s)\r\n" , version_string , OS_TYPE ) < 0
1019
1021
|| fprintf (warc_tmp , "format: WARC File Format 1.1\r\n" ) < 0
1020
1022
|| fprintf (warc_tmp ,
1021
1023
"conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1-1_latestdraft.pdf\r\n" ) < 0
1022
1024
|| fprintf (warc_tmp , "robots: %s\r\n" , (opt .use_robots ? "classic" : "off" )) < 0
1023
- || fprintf (warc_tmp , "wget-arguments: %s\r\n" , program_argstring ) < 0 )
1025
+ || fprintf (warc_tmp , "wget-arguments: %s\r\n" , program_argstring ) < 0
1026
+ || fprintf (warc_tmp , "wget-build-version: %s\r\n" , version_string ) < 0
1027
+ || fprintf (warc_tmp , "wget-build-system-host: %s-%s-%s\r\n" ,
1028
+ SYSTEM_HOST_CPU , SYSTEM_HOST_VENDOR , SYSTEM_HOST_OS ) < 0
1029
+ || fprintf (warc_tmp , "wget-build-system-build: %s-%s-%s\r\n" ,
1030
+ SYSTEM_BUILD_CPU , SYSTEM_BUILD_VENDOR , SYSTEM_BUILD_OS ) < 0
1031
+ || fprintf (warc_tmp , "wget-build-system-target: %s-%s-%s\r\n" ,
1032
+ SYSTEM_TARGET_CPU , SYSTEM_TARGET_VENDOR , SYSTEM_TARGET_OS ) < 0
1033
+ || fprintf (warc_tmp , "wget-build-compilation-string: %s\r\n" , compilation_string ) < 0
1034
+ || fprintf (warc_tmp , "wget-build-link-string: %s\r\n" , link_string ) < 0
1035
+ || fprintf (warc_tmp , "wget-build-features: " ) < 0 )
1024
1036
{
1025
1037
warc_write_ok = false;
1026
1038
return false;
1027
1039
}
1028
1040
1041
+ for (i = 0 ; compiled_features [i ]; i ++ )
1042
+ {
1043
+ if (fprintf (warc_tmp , "%s" , compiled_features [i ]) < 0
1044
+ || (compiled_features [i + 1 ] != NULL && fprintf (warc_tmp , " " ) < 0 )
1045
+ || (compiled_features [i + 1 ] == NULL && fprintf (warc_tmp , "\r\n" ) < 0 ))
1046
+ {
1047
+ warc_write_ok = false;
1048
+ return false;
1049
+ }
1050
+ }
1051
+
1029
1052
/* Add the user headers, if any. */
1030
1053
if (opt .warc_user_headers )
1031
1054
{
0 commit comments