Search code examples
mitmproxy

Is there any way to copy request content?


The problem is that it's indeed cp1252 (yes, I hate retarded people too) character in the body.

curl -kx127.0.0.8:8080 'http://httpbin.org/post' -H 'Content-Type: multipart/form-data; boundary=a' --data-binary $'--a\r\nContent-Disposition: form-data; name="ctl00$BodyContent$txtAtesia"\r\n\r\nDuk\xeb\r\n--a--\r\n'

I've tried request.content and request.raw_content both, mitmproxy crashes. SO doesn't want me to post traceback, but it's reproducible.


Solution

  • Nevermind, request.text works.

    Should mitmproxy developers happen to pass by, they can deal with the crash though:)