title: Allow hop-by-hop headers in Django proxy middleware
body: <p>I need to implement a HTTP proxy in Django and my Google safari led me to a project called <a href="http://code.google.com/p/django-webproxy" rel="nofollow">django-webproxy</a>. </p>
  
  <p>Although no longer maintained, it's quite simple. Most of the logic relies on a simple proxy Middleware class that intercepts all requests to the Django WSGI server and handles it.</p>
  
  <p>If the Middleware returns any data, the WSGI server simply passes it back to the client but if it returns nothing, Django simply handles the request by passing to the other Middleware. </p>
  
  <p>Everything works fine, pretty much, but I need to implement proxy authentication which mean i have to send a 407 status code to the client with a <code>Proxy-Authenticate</code> header. This sin't allowed by Django as it is a hop-by-hop header and Django throws an exception. How can i hack/force/kludge Django into allowing me to send hop-by-hop headers?</p>
  
  <p>FYI, ihe code for the middleware class can be found <a href="http://code.google.com/p/django-webproxy/source/browse/trunk/proxy/middleware.py" rel="nofollow">here</a>.</p>