mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #26158 -- Rewrote http.parse_cookie() to better match browsers.
This commit is contained in:
parent
e7e5d9b338
commit
93a135d111
4 changed files with 70 additions and 17 deletions
|
@ -10,7 +10,6 @@ from django.core.exceptions import SuspiciousOperation
|
|||
from django.core.handlers.wsgi import LimitedStream, WSGIRequest
|
||||
from django.http import (
|
||||
HttpRequest, HttpResponse, RawPostDataException, UnreadablePostError,
|
||||
parse_cookie,
|
||||
)
|
||||
from django.test import RequestFactory, SimpleTestCase, override_settings
|
||||
from django.test.client import FakePayload
|
||||
|
@ -183,9 +182,6 @@ class RequestsTests(SimpleTestCase):
|
|||
request = WSGIRequest({'PATH_INFO': wsgi_str("/سلام/"), 'REQUEST_METHOD': 'get', 'wsgi.input': BytesIO(b'')})
|
||||
self.assertEqual(request.path, "/سلام/")
|
||||
|
||||
def test_parse_cookie(self):
|
||||
self.assertEqual(parse_cookie('invalid@key=true'), {})
|
||||
|
||||
def test_httprequest_location(self):
|
||||
request = HttpRequest()
|
||||
self.assertEqual(request.build_absolute_uri(location="https://www.example.com/asdf"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue