[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] [Bulk] [PATCH] Add option to write URL rejections to a CS

From: Gisle Vanem
Subject: Re: [Bug-wget] [Bulk] [PATCH] Add option to write URL rejections to a CSV log.
Date: Tue, 28 Jul 2015 10:24:29 +0200
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0 SeaMonkey/2.33.1

Jookia wrote:

I've not tried your patch. But by reading it,

+static void write_url_csv (FILE* f, struct url *url)
+  if (!f)
+    return;

Isn't this test superfluous? Already done by caller (?).

I'd suggest the reject-log starts with a comment:

  FILE *rejectedlog = 0;
  if (opt.rejected_log)
      rejectedlog = fopen (opt.rejected_log, "w");
      if (!rejectedlog)
        logprintf (LOG_NOTQUIET, "%s: %s\n", opt.rejected_log, strerror 
        fprintf (rejectedlog,"# Wget reject-log %s generated at --%s-- for 
                 datetime_str (time (NULL),
                 <base-url, where is this stored?> ));

But according to http://tools.ietf.org/html/rfc4180,
it doesn't specify if a "# comment" is legal before the
CSV header. I think most DB-apps do allow it though.

Nice work.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]