mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-04-28 20:24:59 +08:00
used get_decoded_content and removed decode call from headers as max suggested
This commit is contained in:
@@ -143,12 +143,12 @@ class ConnectionItem(common.WWrap):
|
||||
def server_copy_response(self, k):
|
||||
if k == "c":
|
||||
try:
|
||||
pyperclip.copy(self.flow.response_content())
|
||||
pyperclip.copy(self.flow.response.get_decoded_content())
|
||||
except TypeError:
|
||||
self.master.statusbar.message("Content is binary or can be converted to text")
|
||||
elif k == "h":
|
||||
try:
|
||||
pyperclip.copy(self.flow.response_headers())
|
||||
pyperclip.copy(str(self.flow.response.headers))
|
||||
except TypeError:
|
||||
self.master.statusbar.message("Error converting headers to text")
|
||||
|
||||
|
||||
@@ -652,12 +652,12 @@ class FlowView(common.WWrap):
|
||||
def server_copy_response(self, k):
|
||||
if k == "c":
|
||||
try:
|
||||
pyperclip.copy(self.flow.response_content())
|
||||
pyperclip.copy(self.flow.response.get_decoded_content())
|
||||
except TypeError:
|
||||
self.master.statusbar.message("Content is binary or can be converted to text")
|
||||
elif k == "h":
|
||||
try:
|
||||
pyperclip.copy(self.flow.response_headers())
|
||||
pyperclip.copy(str(self.flow.response.headers))
|
||||
except TypeError:
|
||||
self.master.statusbar.message("Error converting headers to text")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user