Fix severe bug when determine request method and secure status.