MCPcopy
hub / github.com/mitmproxy/mitmproxy / get

Method get

mitmproxy/tools/web/app.py:863–877  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

861
862class ProcessImage(RequestHandler):
863 def get(self):
864 path = self.get_query_argument("path", None)
865
866 if not path:
867 raise APIError(400, "Missing 'path' parameter.")
868
869 try:
870 icon_bytes = mitmproxy_rs.process_info.executable_icon(path)
871 except Exception:
872 icon_bytes = TRANSPARENT_PNG
873
874 self.set_header("Content-Type", "image/png")
875 self.set_header("X-Content-Type-Options", "nosniff")
876 self.set_header("Cache-Control", "max-age=604800")
877 self.write(icon_bytes)
878
879
880class GZipContentAndFlowFiles(tornado.web.GZipContentEncoding):

Callers

nothing calls this directly

Calls 2

APIErrorClass · 0.85
writeMethod · 0.45

Tested by

no test coverage detected