Skip to content
Browse files

Simple fix for a unicode error when editing a request URL.

  • Loading branch information...
1 parent ee71bcf commit 3b246f7e278c485a98a5c3b37a21c82b18fd1fee @cortesi cortesi committed Oct 26, 2011
Showing with 11 additions and 11 deletions.
  1. +1 −1 libmproxy/
  2. +10 −10 libmproxy/
2 libmproxy/
@@ -426,7 +426,7 @@ def save_body(self, path):
def set_url(self, url):
request = self.flow.request
- if not request.set_url(url):
+ if not request.set_url(str(url)):
return "Invalid URL."
20 libmproxy/
@@ -21,8 +21,8 @@ def __init__(self, master):
def log(self, *args, **kwargs):
- Logs an event.
+ Logs an event.
How this is handled depends on the front-end. mitmdump will display
events if the eventlog flag ("-e") was passed. mitmproxy sends
output to the eventlog for display ("v" keyboard shortcut).
@@ -184,18 +184,18 @@ class Request(HTTPMsg):
An HTTP request.
Exposes the following attributes:
client_conn: ClientConnection object, or None if this is a replay.
headers: Headers object
content: Content of the request, or None
scheme: URL scheme (http/https)
host: Host portion of the URL
port: Destination port
path: Path portion of the URL
timestamp: Seconds since the epoch
- method: HTTP method
+ method: HTTP method
def __init__(self, client_conn, host, port, scheme, method, path, headers, content, timestamp=None):
self.client_conn = client_conn
@@ -326,7 +326,7 @@ def set_url(self, url):
Parses a URL specification, and updates the Request's information
- Returns False if the URL was invalid, True if the request succeeded.
+ Returns False if the URL was invalid, True if the request succeeded.
parts = utils.parse_url(url)
if not parts:
@@ -539,7 +539,7 @@ def replace(self, pattern, repl, *args, **kwargs):
class ClientDisconnect(controller.Msg):
- A client disconnection event.
+ A client disconnection event.
Exposes the following attributes:
@@ -556,7 +556,7 @@ class ClientConnect(controller.Msg):
Exposes the following attributes:
address: (address, port) tuple, or None if the connection is replayed.
requestcount: Number of requests created by this client connection.
close: Is the client connection closed?
@@ -598,7 +598,7 @@ def copy(self):
class Error(controller.Msg):
- An Error.
+ An Error.
This is distinct from an HTTP error response (say, a code 500), which
is represented by a normal Response object. This class is responsible
@@ -812,7 +812,7 @@ class Flow:
A Flow is a collection of objects representing a single HTTP
transaction. The main attributes are:
request: Request object
response: Response object
error: Error object

0 comments on commit 3b246f7

Please sign in to comment.
Something went wrong with that request. Please try again.