(self)
| 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( |
no test coverage detected