Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0d5643b

Browse files
committed
Only match application/*+json content types
1 parent cafd5fa commit 0d5643b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ public function getContentType()
275275

276276
public function isJsonRequest()
277277
{
278-
return 1 === preg_match('{^application/[a-z]*?\+?json$}i', $this->data['request_headers']['content-type']);
278+
return 1 === preg_match('{^application/(?:\w+\++)*json$}i', $this->data['request_headers']['content-type']);
279279
}
280280

281281
public function getStatusText()

0 commit comments

Comments
 (0)