mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
Update web-platform-tests to revision 5c34fc630374b9eb0559139a486ff1a2e4247c4f
This commit is contained in:
parent
b0f0bd8282
commit
1b463fce85
222 changed files with 5045 additions and 641 deletions
|
@ -1,7 +1,3 @@
|
|||
|
||||
import sys
|
||||
import urlparse
|
||||
|
||||
def main(request, response):
|
||||
"""
|
||||
Returns cookie name and path from query params in a Set-Cookie header.
|
||||
|
@ -20,10 +16,14 @@ def main(request, response):
|
|||
< Date: Tue, 04 Oct 2016 18:16:06 GMT
|
||||
< Content-Length: 80
|
||||
"""
|
||||
params = urlparse.parse_qs(request.url_parts.query)
|
||||
|
||||
name = request.GET[b'name']
|
||||
path = request.GET[b'path']
|
||||
cookie = b"%s=1; Path=%s; Expires=Wed, 09 Jun 2021 10:18:14 GMT" % (name, path)
|
||||
|
||||
headers = [
|
||||
("Content-Type", "application/json"),
|
||||
("Set-Cookie", "{name[0]}=1; Path={path[0]}; Expires=Wed, 09 Jun 2021 10:18:14 GMT".format(**params))
|
||||
(b"Content-Type", b"application/json"),
|
||||
(b"Set-Cookie", cookie)
|
||||
]
|
||||
body = "{}"
|
||||
body = b"{}"
|
||||
return headers, body
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue