MCPcopy
hub / github.com/pyload/pyload / do_GET

Method do_GET

module/remote/ClickAndLoadBackend.py:70–99  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

68 self.end_headers()
69
70 def do_GET(self):
71 path = self.path.strip("/").lower()
72 #self.wfile.write(path+"\n")
73
74 self.map = [ (r"add$", self.add),
75 (r"addcrypted$", self.addcrypted),
76 (r"addcrypted2$", self.addcrypted2),
77 (r"flashgot", self.flashgot),
78 (r"crossdomain\.xml", self.crossdomain),
79 (r"checkSupportForUrl", self.checksupport),
80 (r"jdcheck.js", self.jdcheck),
81 (r"", self.flash) ]
82
83 func = None
84 for r, f in self.map:
85 if re.match(r"(flash(got)?/?)?"+r, path):
86 func = f
87 break
88
89 if func:
90 try:
91 resp = func()
92 if not resp: resp = "success"
93 resp += "\r\n"
94 self.start_response(resp)
95 self.wfile.write(resp)
96 except Exception,e :
97 self.send_error(500, str(e))
98 else:
99 self.send_error(404, "Not Found")
100
101 def do_POST(self):
102 form = FieldStorage(

Callers 1

do_POSTMethod · 0.95

Calls 3

start_responseMethod · 0.95
matchMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected