diff --git a/controller.rst b/controller.rst index 86b5c5f07ca..5b0f940ca2f 100644 --- a/controller.rst +++ b/controller.rst @@ -522,7 +522,7 @@ the ``Request`` class:: // retrieves an HTTP request header, with normalized, lowercase keys $request->headers->get('host'); - $request->headers->get('content_type'); + $request->headers->get('content-type'); } The ``Request`` class has several public properties and methods that return any diff --git a/create_framework/http_foundation.rst b/create_framework/http_foundation.rst index 79ff1c953a6..a7c4065d842 100644 --- a/create_framework/http_foundation.rst +++ b/create_framework/http_foundation.rst @@ -192,7 +192,7 @@ fingertips thanks to a nice and simple API:: // retrieve an HTTP request header, with normalized, lowercase keys $request->headers->get('host'); - $request->headers->get('content_type'); + $request->headers->get('content-type'); $request->getMethod(); // GET, POST, PUT, DELETE, HEAD $request->getLanguages(); // an array of languages the client accepts diff --git a/introduction/http_fundamentals.rst b/introduction/http_fundamentals.rst index c3ad78bf3dc..6e7cb1cf183 100644 --- a/introduction/http_fundamentals.rst +++ b/introduction/http_fundamentals.rst @@ -231,7 +231,7 @@ have all the request information at your fingertips:: // retrieves an HTTP request header, with normalized, lowercase keys $request->headers->get('host'); - $request->headers->get('content_type'); + $request->headers->get('content-type'); $request->getMethod(); // e.g. GET, POST, PUT, DELETE or HEAD $request->getLanguages(); // an array of languages the client accepts