Added support for HEAD and arbitrary http methods in router.