Fix bug to handle arbitrary HEAD requests.