gitwebcache.sh: set REQUEST_METHOD before running gitweb.cgi
When the following change was made to the gitweb.cgi source:
1daeb5ba gitweb.perl: only allow GET and HEAD methods
the gitweb.cgi script started exiting early with a 405 error unless
it was passed either a GET or HEAD request method. This change is
good in that it minimizes the time spent by gitweb.cgi processing
bogus requests generated by bots/DOS/hackers etc.
The gitwebcache.sh script essentially runs the gitweb.cgi script
in order to load its function definitions and use them to regenerate
the cache file. Unfortunately this looks just like a normal web
request to gitweb.cgi and it bails early now if REQUEST_METHOD is not
set to either GET or HEAD.
Set REQUEST_METHOD to HEAD when running gitweb.cgi so that the
necessary cache rebuilding functions can be accessed.
The value GET could also be used, but looking forward to a time when
gitweb.cgi optimizes the handling of HEAD (which could potentially
need to use a lot less CPU time than GET), HEAD is preferred since
gitwebcache.sh discards the actual output of gitweb.cgi.