fix test_head_method from false-positive

This commit fixes the issue with test_head_method that described here:
http://tp.mail.ru/blog/highload/539.html#comment3632