def _getHTTPServer(self, logFile):
        class FileHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
            count = 0
            def log_message(slf, *args, **kw):
                file(logFile, "a").write("%s\n" % slf.path)

            def do_GET(slf):
                if slf.path.endswith('/count'):
                    contentType = 'text/plain'
                    archpath = self.workDir + '/count'
                    FileHandler.count += 1
                    open(archpath, 'w').write('%s\n' % slf.count)
                elif (slf.path.startswith("/bad/") or
                    not slf.path.endswith('.tar.gz')):
                #if (slf.path.startswith("/bad/") or
                #        not (slf.path.endswith('.tar.gz') or
                #             slf.path.endswith('.tar.gz.asc'))):
                    slf.send_response(404)
                    slf.end_headers()
                    return
                elif slf.path.endswith('.tar.gz'):
                    archpath = os.path.join(resources.get_archive(), "foo-1.0.tar.gz")
                    contentType = "application/x-gzip"
                else:
                    archpath = os.path.join(self.workDir, "foo.asc")
                    file(archpath, "w+").write("Pretend this is a PGP sig")
                    contentType = 'application/pgp-signature'
                fileSize = os.stat(archpath).st_size
                slf.send_response(200)
                slf.send_header("Content-Type", contentType)
                slf.send_header("Content-Length", fileSize)
                slf.end_headers()
                util.copyStream(open(archpath), slf.wfile)

        hs = rephelp.HTTPServerController(FileHandler)
        return hs