Fixed issue with detecting illegal HTTP methods