bug-wget
[Top][All Lists]
Advanced

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

[Bug-wget] [bug #56808] wget uses HEAD method when both --spider and --p


From: Darshit Shah
Subject: [Bug-wget] [bug #56808] wget uses HEAD method when both --spider and --post-data options are used
Date: Mon, 26 Aug 2019 16:00:40 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0

Follow-up Comment #2, bug #56808 (project wget):

`--post-data` works by setting `opt.method` and `opt.body_data` while
`--spider` works by setting `opt.method`, albeit indirectly.

Now, I believe that it makes absolutely no sense to set both of those in
contradicting ways. Especially with something like `POST` or `PUT` which
requires a Request body. Since a request body is not allowed with a HEAD
request.

My suggestion here would be to add a check that prevents _any_ change to
`opt.method` if `--spider` is also passed.

This prevents not only `--post-data`, but also `--method` from setting
something funny that makes no sense.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56808>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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