Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
d130a1bc
Commit
d130a1bc
authored
Jul 01, 2007
by
Lennart Regebro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Collector #2153: Supporting unquoted cookies with spaces.
parent
b9679862
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
doc/CHANGES.txt
doc/CHANGES.txt
+2
-0
lib/python/ZPublisher/HTTPRequest.py
lib/python/ZPublisher/HTTPRequest.py
+1
-1
lib/python/ZPublisher/tests/testHTTPRequest.py
lib/python/ZPublisher/tests/testHTTPRequest.py
+14
-0
No files found.
doc/CHANGES.txt
View file @
d130a1bc
...
@@ -102,6 +102,8 @@ Zope Changes
...
@@ -102,6 +102,8 @@ Zope Changes
Bugs Fixed
Bugs Fixed
- Collector #2153: Supporting unquoted cookies with spaces.
- The REQUEST no longer accepts holds after it has been closed.
- The REQUEST no longer accepts holds after it has been closed.
- Five.browser.metaconfigure.page didn't protect names from interface
- Five.browser.metaconfigure.page didn't protect names from interface
...
...
lib/python/ZPublisher/HTTPRequest.py
View file @
d130a1bc
...
@@ -1476,7 +1476,7 @@ def parse_cookie(text,
...
@@ -1476,7 +1476,7 @@ def parse_cookie(text,
qparmre
=
re
.
compile
(
qparmre
=
re
.
compile
(
'([
\
x00
- ]*([^
\
x00
- ;,="]+)="([^"]*)"([
\
x00
- ]*[;,])?[
\
x00
- ]*)'
),
'([
\
x00
- ]*([^
\
x00
- ;,="]+)="([^"]*)"([
\
x00
- ]*[;,])?[
\
x00
- ]*)'
),
parmre
=
re
.
compile
(
parmre
=
re
.
compile
(
'([
\
x00
- ]*([^
\
x00
- ;,="]+)=([^
\
x00
-
;,"]*)([
\
x00
- ]*[;,])?[
\
x00
- ]*)'
),
'([
\
x00
- ]*([^
\
x00
- ;,="]+)=([^;,"]*)([
\
x00
- ]*[;,])?[
\
x00
- ]*)'
),
paramlessre
=
re
.
compile
(
paramlessre
=
re
.
compile
(
'([
\
x00
- ]*([^
\
x00
- ;,="]+)[
\
x00
- ]*[;,][
\
x00
- ]*)'
),
'([
\
x00
- ]*([^
\
x00
- ;,="]+)[
\
x00
- ]*[;,][
\
x00
- ]*)'
),
...
...
lib/python/ZPublisher/tests/testHTTPRequest.py
View file @
d130a1bc
...
@@ -658,6 +658,20 @@ class ProcessInputsTests(unittest.TestCase):
...
@@ -658,6 +658,20 @@ class ProcessInputsTests(unittest.TestCase):
self
.
assertEquals
(
req
.
cookies
[
'hmm'
],
''
)
self
.
assertEquals
(
req
.
cookies
[
'hmm'
],
''
)
self
.
assertEquals
(
req
.
cookies
[
'baz'
],
'gee'
)
self
.
assertEquals
(
req
.
cookies
[
'baz'
],
'gee'
)
# Unquoted multi-space cookies
env
[
'HTTP_COOKIE'
]
=
'single=cookie data; '
\
'quoted="cookie data with unquoted spaces"; '
\
'multi=cookie data with unquoted spaces; '
\
'multi2=cookie data with unquoted spaces'
req
=
self
.
_getHTTPRequest
(
env
)
self
.
assertEquals
(
req
.
cookies
[
'single'
],
'cookie data'
)
self
.
assertEquals
(
req
.
cookies
[
'quoted'
],
'cookie data with unquoted spaces'
)
self
.
assertEquals
(
req
.
cookies
[
'multi'
],
'cookie data with unquoted spaces'
)
self
.
assertEquals
(
req
.
cookies
[
'multi2'
],
'cookie data with unquoted spaces'
)
TEST_ENVIRON
=
{
TEST_ENVIRON
=
{
'CONTENT_TYPE'
:
'multipart/form-data; boundary=12345'
,
'CONTENT_TYPE'
:
'multipart/form-data; boundary=12345'
,
'REQUEST_METHOD'
:
'POST'
,
'REQUEST_METHOD'
:
'POST'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment