Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1299)

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/tools/wptserve/wptserve/handlers.py

Issue 2478073002: Revert of wptserve: Import the latest revision of wptserve-related files. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/tools/wptserve/wptserve/handlers.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/tools/wptserve/wptserve/handlers.py b/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/tools/wptserve/wptserve/handlers.py
index 9cc1f7341df98078f096adf3f70690a8d168a699..c40321dfeabb4d97ce134137a76fb928285e5c9f 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/tools/wptserve/wptserve/handlers.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/thirdparty/wpt/wpt/tools/wptserve/wptserve/handlers.py
@@ -2,8 +2,8 @@
import json
import os
import traceback
-
-from six.moves.urllib.parse import parse_qs, quote, unquote, urljoin
+import urllib
+import urlparse
from .constants import content_types
from .pipes import Pipeline, template
@@ -30,7 +30,7 @@
if base_path is None:
base_path = request.doc_root
- path = unquote(request.url_parts.path)
+ path = urllib.unquote(request.url_parts.path)
if path.startswith(url_base):
path = path[len(url_base):]
@@ -85,11 +85,11 @@
# statically defined ones
if base_path != "/":
- link = urljoin(base_path, "..")
+ link = urlparse.urljoin(base_path, "..")
yield ("""<li class="dir"><a href="%(link)s">%(name)s</a></li>""" %
{"link": link, "name": ".."})
for item in sorted(os.listdir(path)):
- link = cgi.escape(quote(item))
+ link = cgi.escape(urllib.quote(item))
if os.path.isdir(os.path.join(path, item)):
link += "/"
class_ = "dir"
@@ -128,7 +128,7 @@
byte_ranges = None
data = self.get_data(response, path, byte_ranges)
response.content = data
- query = parse_qs(request.url_parts.query)
+ query = urlparse.parse_qs(request.url_parts.query)
pipeline = None
if "pipe" in query:

Powered by Google App Engine
This is Rietveld 408576698