--- libhproxy/cmdline.py.orig 2013-01-22 10:35:12.000000000 +0000
+++ libhproxy/cmdline.py 2013-06-05 10:46:39.733490634 +0100
@@ -1,4 +1,5 @@
import argparse
+import shlex
"""
see mitmproxy/libmproxy/cmdline
we remove all unwanted parameters and add everything we need for HoneyProxy
@@ -16,7 +17,7 @@
def convert_arg_line_to_args(self, arg_line):
if arg_line.lstrip().startswith("#"):
return
- for arg in arg_line.split():
+ for arg in shlex.split(arg_line):
if not arg.strip():
continue
yield arg
Testcase: --replace-from-file "/~s/function init(){/testfile.js"
Patch: