Prechádzať zdrojové kódy

fixes a bug when overriding method via the X-HTTP-METHOD-OVERRIDE header

Johannes Schmitt 13 rokov pred
rodič
commit
b6ee1a67a7

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

@@ -741,7 +741,7 @@ class Request
         if (null === $this->method) {
             $this->method = strtoupper($this->server->get('REQUEST_METHOD', 'GET'));
             if ('POST' === $this->method) {
-                $this->method = strtoupper($this->server->get('X-HTTP-METHOD-OVERRIDE', $this->request->get('_method', 'POST')));
+                $this->method = strtoupper($this->headers->get('X-HTTP-METHOD-OVERRIDE', $this->request->get('_method', 'POST')));
             }
         }