mirror of
https://github.com/django/daphne.git
synced 2025-04-21 01:02:06 +03:00
Django 1.10 patch fixes
This commit is contained in:
parent
cf9d7d6f76
commit
45dfeb548e
|
@ -87,14 +87,16 @@ class AsgiRequest(http.HttpRequest):
|
|||
self.META[corrected_name] = value
|
||||
# Pull out request encoding if we find it
|
||||
if "CONTENT_TYPE" in self.META:
|
||||
_, content_params = cgi.parse_header(self.META["CONTENT_TYPE"])
|
||||
if 'charset' in content_params:
|
||||
self.content_type, self.content_params = cgi.parse_header(self.META["CONTENT_TYPE"])
|
||||
if 'charset' in self.content_params:
|
||||
try:
|
||||
codecs.lookup(content_params['charset'])
|
||||
codecs.lookup(self.content_params['charset'])
|
||||
except LookupError:
|
||||
pass
|
||||
else:
|
||||
self.encoding = content_params['charset']
|
||||
self.encoding = self.content_params['charset']
|
||||
else:
|
||||
self.content_type, self.content_params = "", {}
|
||||
# Pull out content length info
|
||||
if self.META.get('CONTENT_LENGTH', None):
|
||||
try:
|
||||
|
|
|
@ -124,6 +124,7 @@ global_transforms = [
|
|||
Replacement(r"from django.channels.tests import", r"from django.test.channels import"),
|
||||
Replacement(r"from django.channels.handler import", r"from django.core.handlers.asgi import"),
|
||||
Replacement(r"channels.tests.test_routing", r"channels_tests.test_routing"),
|
||||
Replacement(r"django.core.urlresolvers", r"django.urls"),
|
||||
]
|
||||
|
||||
python_transforms = global_transforms + [
|
||||
|
|
Loading…
Reference in New Issue
Block a user