Re: [Bug-wget] warning about unknown .wgetrc directives
Hi Karl, k...@freefriends.org (Karl Berry) writes: Giuseppe et al., I suggest making unknown .wgetrc directives a warning (and just ignore them, proceeding on normally), rather than a failure. For purposes of compatibility - a person might have a brand-new wget on system A, but for whatever reason, have to run an older wget on system B. But it's convenient to have the same wget regardless. In general I tend to agree with you as it makes easier to reuse the .wgetrc file but I think problems with unknown directives should still be threated as errors. It may happen that we will add some security related directive, and while users rely on wget to honor that, wget instead will simply ignore it and give the impression it works. Unless we add something like --ignore-wgetrc-errors... Regards, Giuseppe
Re: [Bug-wget] warning about unknown .wgetrc directives
On Fri, Apr 4, 2014 at 4:40 PM, Giuseppe Scrivano gscriv...@gnu.org wrote: Hi Karl, k...@freefriends.org (Karl Berry) writes: Giuseppe et al., I suggest making unknown .wgetrc directives a warning (and just ignore them, proceeding on normally), rather than a failure. For purposes of compatibility - a person might have a brand-new wget on system A, but for whatever reason, have to run an older wget on system B. But it's convenient to have the same wget regardless. In general I tend to agree with you as it makes easier to reuse the .wgetrc file but I think problems with unknown directives should still be threated as errors. It may happen that we will add some security related directive, and while users rely on wget to honor that, wget instead will simply ignore it and give the impression it works. Unless we add something like --ignore-wgetrc-errors... I think that's over-engineering the problem. Some time ago, Tim, if I remember correctly proposed using version lines. So, newer commands can be marked as valid under a certain version only. The whole scheme can be made backward compatible by assuming the lack of a version line to imply the current version. -- Thanking You, Darshit Shah
Re: [Bug-wget] warning about unknown .wgetrc directives
Darshit Shah dar...@gmail.com writes: Unless we add something like --ignore-wgetrc-errors... I think that's over-engineering the problem. Some time ago, Tim, if I remember correctly proposed using version lines. So, newer commands can be marked as valid under a certain version only. The whole scheme can be made backward compatible by assuming the lack of a version line to imply the current version. how would that prevent that wget should not ignore certain directives? An older wget doesn't know how to deal with newer directives, what other alternatives beside fail/ignore do we have? Regards, Giuseppe
Re: [Bug-wget] warning about unknown .wgetrc directives
On Fri, Apr 4, 2014 at 5:25 PM, Giuseppe Scrivano gscriv...@gnu.org wrote: Darshit Shah dar...@gmail.com writes: Unless we add something like --ignore-wgetrc-errors... I think that's over-engineering the problem. Some time ago, Tim, if I remember correctly proposed using version lines. So, newer commands can be marked as valid under a certain version only. The whole scheme can be made backward compatible by assuming the lack of a version line to imply the current version. how would that prevent that wget should not ignore certain directives? An older wget doesn't know how to deal with newer directives, what other alternatives beside fail/ignore do we have? Wait, older versions will always fail on such a wgetrc file. It was a half baked idea that I proposed. Scratch that. -- Thanking You, Darshit Shah
Re: [Bug-wget] warning about unknown .wgetrc directives
Am Freitag, 4. April 2014, 17:14:07 schrieb Darshit Shah: On Fri, Apr 4, 2014 at 4:40 PM, Giuseppe Scrivano gscriv...@gnu.org wrote: Hi Karl, k...@freefriends.org (Karl Berry) writes: Giuseppe et al., I suggest making unknown .wgetrc directives a warning (and just ignore them, proceeding on normally), rather than a failure. For purposes of compatibility - a person might have a brand-new wget on system A, but for whatever reason, have to run an older wget on system B. But it's convenient to have the same wget regardless. In general I tend to agree with you as it makes easier to reuse the .wgetrc file but I think problems with unknown directives should still be threated as errors. It may happen that we will add some security related directive, and while users rely on wget to honor that, wget instead will simply ignore it and give the impression it works. Unless we add something like --ignore-wgetrc-errors... I think that's over-engineering the problem. Some time ago, Tim, if I remember correctly proposed using version lines. So, newer commands can be marked as valid under a certain version only. The whole scheme can be made backward compatible by assuming the lack of a version line to imply the current version. I thought it was about a protocol to support external programs... But however: we can't fix Karl's problem for now... the machines running an old Wget won't update. So we are talking about future versions and how we deal with such situations in the future. And here, a 'version' line could in fact help. 1. Reading a .wgetrc file with none or with a 'known' version: treat unknown directives as errors. 2. Reading a .wgetrc file with with a 'future' version: treat unknown directives as warnings and continue. And to make 2. more intelligent, we could use unsharp comparisons: e.g. we read 'remoteencding' (so something similar to 'remoteencoding') AND there is no exact 'remoteencoding' or '#remoteencoding' found in .wgetrc, we could error. Maybe we should put this into a library... it would be useful for many tools ;-) Tim signature.asc Description: This is a digitally signed message part.