bug-wget
[Top][All Lists]
Advanced

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

[Bug-wget] [PATCH] Remove hyphens from command names (Was: Re: Hyphens i


From: Jeffery To
Subject: [Bug-wget] [PATCH] Remove hyphens from command names (Was: Re: Hyphens in command name (init.c) / option data (main.c))
Date: Thu, 4 Aug 2016 23:32:17 +0800

On Thu, Aug 4, 2016 at 9:53 PM, Tim Ruehsen <address@hidden> wrote:

> On Thursday, August 4, 2016 5:38:22 PM CEST Jeffery To wrote:
> > Hi,
> >
> > I'm trying to set the hsts-file option from a wgetrc file, but Wget
> (1.17.1
> > on Ubuntu 16.04 x86_64) tells me it is an unknown command. (The same
> option
> > passed on the command line yields no errors.)
> >
> > I looked into the source (albeit a very cursory examination), and it
> > appears that in init.c (run_wgetrc), the command name is taken from each
> > line of the wgetrc file (parse_line), hyphens and underscores are removed
> > from the name (dehyphen), and then searched for in the commands array
> > (command_by_name).
> >
> > Currently, the name for the hsts-file option in the commands array is
> > "hsts-file" (note the included hyphen), and so it would be impossible to
> > match this command from a wgetrc file. (There are several other commands
> > that have hyphens in their names in the commands array, e.g.
> > "if-modified-since" and several Metalink options, which I would expect to
> > also suffer from this issue, though I haven't tested them individually.)
> >
> > Is this analysis correct, and if so, would a patch that removes the
> hyphens
> > from command names (and from the corresponding data field in the
> > option_data array in main.c) be acceptable?
>
> Hi Jeff,
>
> thanks for your analysis, which is correct.
>
> A patch would be very appreciated.
> Since it will (well, I guess so) be a 'trivial' patch, no FSF copyright
> assignment is needed. So, just go ahead !
>
> Regards, Tim
>

Thanks Tim - attached is the patch. Let me know if I should instead send it
inline in a new email.

Best regards,
Jeff

Attachment: 0001-Remove-hyphens-from-command-names.patch
Description: Text Data


reply via email to

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