Refactor protocol.py to remove dependence on flow and utils.

This commit is contained in:
Aldo Cortesi
2012-06-17 10:52:39 +12:00
parent aae8a9959c
commit 7b9756f48e
6 changed files with 70 additions and 72 deletions

View File

@@ -21,7 +21,7 @@ import hashlib, Cookie, cookielib, copy, re, urlparse
import time
import tnetstring, filt, script, utils, encoding, proxy
from email.utils import parsedate_tz, formatdate, mktime_tz
import controller, version, certutils
import controller, version, certutils, protocol
HDR_FORM_URLENCODED = "application/x-www-form-urlencoded"
CONTENT_MISSING = 0
@@ -514,7 +514,7 @@ class Request(HTTPMsg):
Returns False if the URL was invalid, True if the request succeeded.
"""
parts = utils.parse_url(url)
parts = protocol.parse_url(url)
if not parts:
return False
self.scheme, self.host, self.port, self.path = parts