Follow-up Comment #4, bug #48811 (project wget):

I have attached a patch file which solves this issue perfectly. But, other
than that, I have a minor doubt on the priority problem, which can be looked
into later.

The man page of wget itself says that --ask-password and --password are
mutually exclusive, i.e they cannot be used simultaneously.

I also ran a test case for it -

wget --user=something --password=something2 --ask-password
https://www.example.com

ERROR MESSAGE :

Cannot specify both --ask-password and --password.
Usage: wget [OPTION]... [URL]...

So, IMO we don't really have to worry about the priority between
opt.http_passwd and opt.passwd? Is there any other reason why you think this
should be done?

And, that too for user, it is always command line argument ( there is no
prompt for user as of I know ), so even in that, any order can be given. And,
to my surprise it actually doesn't throw an error for giving both --user and
--http-user arguments?! 

wget --http-user=something2 --http-password=something3 --ask-password
www.example.com

I think here, --http-password should get priority ( although these cases
should throw an error? I could raise another issue? ).

wget --user=something --http-password=something3 --ask-password
www.example.com

I think here, --ask-password gets priority

So, shouldn't the password priority depend on what kind of username we get? (
whether it is general username --user or http username --http-user? )

Or is --ask-password only associated with --user, and NOT with --http-user or
--ftp-user?

To resolve unnecessary complications, like we discussed before, I have given
higher priority to opt.passwd when opt.ask_passwd is set.

Thank you,
Vijeth

(file #39310)
    _______________________________________________________

Additional Item Attachment:

File name: fixes-http.c-and-ftp.c-passwd-logic-error_varadhya.patch Size:3 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48811>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


Reply via email to