Skip to content

Commit 24f2d0e

Browse files
committed
Merge pull request php-curl-class#192 from zachborboa/master
Add support for detecting additional JSON content-types
2 parents c89f077 + e3b405e commit 24f2d0e

File tree

2 files changed

+1145
-1
lines changed

2 files changed

+1145
-1
lines changed

src/Curl/Curl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class Curl
4141
private $options = array();
4242

4343
private $json_decoder = null;
44-
private $json_pattern = '~^application/(?:json|vnd\.api\+json)~i';
44+
private $json_pattern = '/^(?:application|text)\/(?:[a-z]+(?:[\.-][0-9a-z]+){0,}[\+\.]|x-)?json(?:-[a-z]+)?/i';
4545
private $xml_pattern = '~^(?:text/|application/(?:atom\+|rss\+)?)xml~i';
4646

4747
/**

0 commit comments

Comments
 (0)