def do_GET(self):
        datadir = os.path.join(os.path.split(__file__)[0], "sample_provider_pages")

        # remove the first character because includes /
        submitted_url = self.path[1:len(self.path)+1]
        # separate everything after & because is id
        try:
            (url_part, arg_part) = submitted_url.split("?")
        except __HOLE__:
            url_part = submitted_url

        # don't try to serve up the favicon, just exit
        if url_part == "favicon.ico":
            return

        sample_provider_page_path = os.path.join(datadir, url_part)
        print sample_provider_page_path
        try:
            text = open(sample_provider_page_path).read()
            print text
            print "Found:", submitted_url
            self.send_response(200)
            self.end_headers()
            self.wfile.write(text)
        except IOError:
            print "Not Found:", submitted_url
            self.send_response(500, "Test Proxy: Unknown URL")
        print "done with do_GET"
dataset/ETHPy150Open Impactstory/total-impact-core/extras/functional_tests/alt_providers_test_proxy.py/ProvidersTestProxy.do_GET