Переглянути джерело

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

Johannes Schmitt 13 роки тому
батько
коміт
b6ee1a67a7
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      src/Symfony/Component/HttpFoundation/Request.php

+ 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')));
             }
         }