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

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to