Changing the direct access of super globals in Cake/Network/CakeRequest.php to use env() and fixed a typo.