mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-29 19:08:44 +00:00
db658b12ed
fixes #3072 closes #3254
16 lines
413 B
Python
16 lines
413 B
Python
from mitmproxy.net.http import url
|
|
from . import base
|
|
|
|
|
|
class ViewURLEncoded(base.View):
|
|
name = "URL-encoded"
|
|
content_types = ["application/x-www-form-urlencoded"]
|
|
|
|
def __call__(self, data, **metadata):
|
|
try:
|
|
data = data.decode("ascii", "strict")
|
|
except ValueError:
|
|
return None
|
|
d = url.decode(data)
|
|
return "URLEncoded form", base.format_pairs(d)
|