コード例 #1
0
ファイル: contentviews.py プロジェクト: Angelcold/mitmproxy
 def __call__(self, data, **metadata):
     try:
         data = data.decode("ascii", "strict")
     except ValueError:
         return None
     d = url.decode(data)
     return "URLEncoded form", format_dict(multidict.MultiDict(d))
コード例 #2
0
ファイル: contentviews.py プロジェクト: dufferzafar/mitmproxy
 def __call__(self, data, **metadata):
     try:
         data = data.decode("ascii", "strict")
     except ValueError:
         return None
     d = url.decode(data)
     return "URLEncoded form", format_dict(multidict.MultiDict(d))
コード例 #3
0
ファイル: contentviews.py プロジェクト: bemre/mitmproxy
 def __call__(self, data, **metadata):
     d = url.decode(data)
     return "URLEncoded form", format_dict(multidict.MultiDict(d))
コード例 #4
0
def test_urldecode():
    s = "one=two&three=four"
    assert len(url.decode(s)) == 2
コード例 #5
0
ファイル: test_url.py プロジェクト: skywind0218/mitmproxy
def test_decode():
    s = "one=two&three=four"
    assert len(url.decode(s)) == 2
    assert url.decode(surrogates)
コード例 #6
0
 def __call__(self, data, **metadata):
     d = url.decode(data)
     return "URLEncoded form", format_dict(multidict.MultiDict(d))
コード例 #7
0
ファイル: test_url.py プロジェクト: Angelcold/mitmproxy
def test_decode():
    s = "one=two&three=four"
    assert len(url.decode(s)) == 2
    assert url.decode(surrogates)