Fixed a bug where a bad HEAD request would lead to a GET request anyway. Added some comments.