1

I'm trying to run Wget for a certain HTTP url, also using http-user and http-password command line options (tried the --user and --password, same results). Using the --no-check-certificate options as well so basically running this line :

wget --no-check-certificate --http-user=user --http-password=password https://url.com

I'm getting this response :

Connecting to url.com|10.11.10.98|:443... connected.
WARNING: cannot verify url.com's certificate, issued by `/C=IL/ST=url.com':
  Self-signed certificate encountered.
HTTP request sent, awaiting response... 400 Bad Request
2012-01-18 15:13:53 ERROR 400: Bad Request.

Please advise

akapulko2020
  • 111
  • 1
  • 1
  • 7

1 Answers1

3

You're missing the option dashes for both --http-user and --http-password:

wget --server-response --no-check-certificate --http-user=user --http-password=password https://url.com

The fact that this appears to "look like" a URL to wget may be the reason it uses HTTP and not HTTPS for the real URL as well.

adaptr
  • 16,576
  • 23
  • 34
  • 1
    For single test requests like this, I can recommend using `wget -O /dev/null -d [rest of options]`, this will show you useful debug output, including header exchanges between the client and the server, so you can see what's going on. – SmallClanger Jan 18 '12 at 13:53
  • Thanks @adaptr, that was my mistake in retyping the command line for the question as the copy-paste didn't work.. :) – akapulko2020 Jan 18 '12 at 15:50