#!/usr/bin/env python

import sys
import json
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer

class ErrorHTTPRequestHandler(BaseHTTPRequestHandler):
    def do_GET(self):
        self.send_response(self.config['get_response'])

if sys.argv[1:]:
    config_file = sys.argv[1:]
else:
    config_file = "Proxyfile"
with open(config_file) as c:
    config = json.load(c)
ErrorHTTPRequestHandler.config = config
httpd = HTTPServer(("localhost", config['port']), ErrorHTTPRequestHandler)
httpd.serve_forever()

@@ -191,52 +191,182 @@
     
-self.send_response(self.config%5B'get_response
+print self.path%0A        conf = self.config%5B'get'%5D%0A        if self.path in conf:%0A            self.send_error(conf%5Bself.path%5D)%0A        else:%0A            self.send_error(conf%5B'*
 '%5D)%0A

Configure responses by URL.