Explorar o código

[HttpFoundation] Always force the request method to full caps

Jordi Boggiano %!s(int64=14) %!d(string=hai) anos
pai
achega
f6bc712028
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/Symfony/Component/HttpFoundation/Request.php

+ 2 - 2
src/Symfony/Component/HttpFoundation/Request.php

@@ -129,7 +129,7 @@ class Request
      *
      * @return Request A Request instance
      */
-    static public function create($uri, $method = 'get', $parameters = array(), $cookies = array(), $files = array(), $server = array())
+    static public function create($uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array())
     {
         $defaults = array(
             'SERVER_NAME'          => 'localhost',
@@ -591,7 +591,7 @@ class Request
 
     public function isMethodSafe()
     {
-        return in_array(strtolower($this->getMethod()), array('get', 'head'));
+        return in_array($this->getMethod(), array('GET', 'HEAD'));
     }
 
     public function getETags()