What headers are automatically sent by wget?
HttpHttp HeadersWgetHttp Problem Overview
I know that you can manually set some headers with the --header
option, but I want to know what headers it sends without interaction.
Http Solutions
Solution 1 - Http
Using the -d
(--debug
) option I see it set:
---request begin---
GET / HTTP/1.0
User-Agent: Wget/1.12 (cygwin)
Accept: */*
Host: www.uml.edu
Connection: Keep-Alive
---request end---
Solution 2 - Http
that's easy to check: write a script that displays the sent headers or dump headers with your web server.
with PHP you need print_r(getallheaders());
Array
(
[User-Agent] => Wget/1.11.4
[Accept] => */*
[Host] => localhost
[Connection] => Keep-Alive
)
Tested with GNU Wget 1.11.4.