diff options
| author | Claude Paroz <claude@2xlibre.net> | 2017-03-07 16:44:15 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2017-03-07 17:00:20 +0100 |
| commit | ca58a405fca0ddc5ce2cb3d022dec403df1a5031 (patch) | |
| tree | 8a82697f61f60e4e0d30a235da4b9e50498a6333 /django/test | |
| parent | 77c3cbe08a3bc8845a705519929f77237cb4d5d6 (diff) | |
[1.11.x] Refs #27622 -- Fixed a regression in JSON content-type detection
A JSON Content-Type can contain further content, like charset for example.
Backport of 145f6c3ed6e8856078e2d04ff2567e9fb4a17930 from master.
Diffstat (limited to 'django/test')
| -rw-r--r-- | django/test/client.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/test/client.py b/django/test/client.py index 05d3d78603..d04a718b88 100644 --- a/django/test/client.py +++ b/django/test/client.py @@ -35,7 +35,7 @@ BOUNDARY = 'BoUnDaRyStRiNg' MULTIPART_CONTENT = 'multipart/form-data; boundary=%s' % BOUNDARY CONTENT_TYPE_RE = re.compile(r'.*; charset=([\w\d-]+);?') # JSON Vendor Tree spec: https://tools.ietf.org/html/rfc6838#section-3.2 -JSON_CONTENT_TYPE_RE = re.compile(r'^application\/(vnd\..+\+)?json$') +JSON_CONTENT_TYPE_RE = re.compile(r'^application\/(vnd\..+\+)?json') class RedirectCycleError(Exception): |
