Skip to content

Commit 4310a38

Browse files
committed
minor #10651 Rename content_type header to content-type (ottaviano)
This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes #10651). Discussion ---------- Rename content_type header to content-type Commits ------- 9feaac0 Rename content_type header to content-type
2 parents 06b1ee6 + 9feaac0 commit 4310a38

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

controller.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ the ``Request`` class::
487487

488488
// retrieves an HTTP request header, with normalized, lowercase keys
489489
$request->headers->get('host');
490-
$request->headers->get('content_type');
490+
$request->headers->get('content-type');
491491
}
492492

493493
The ``Request`` class has several public properties and methods that return any

create_framework/http_foundation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ fingertips thanks to a nice and simple API::
192192

193193
// retrieve an HTTP request header, with normalized, lowercase keys
194194
$request->headers->get('host');
195-
$request->headers->get('content_type');
195+
$request->headers->get('content-type');
196196

197197
$request->getMethod(); // GET, POST, PUT, DELETE, HEAD
198198
$request->getLanguages(); // an array of languages the client accepts

introduction/http_fundamentals.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ have all the request information at your fingertips::
231231

232232
// retrieves an HTTP request header, with normalized, lowercase keys
233233
$request->headers->get('host');
234-
$request->headers->get('content_type');
234+
$request->headers->get('content-type');
235235

236236
$request->getMethod(); // e.g. GET, POST, PUT, DELETE or HEAD
237237
$request->getLanguages(); // an array of languages the client accepts

0 commit comments

Comments
 (0)