[bugzilla-gnome-org-extensions] Remove X-Forwarded-Host header



commit 2cc58e7519d2e49f72ea09d73c8f507d12533b28
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Mon Sep 14 17:49:16 2009 -0400

    Remove X-Forwarded-Host header
    
    X-Forwarded-Host might be set if we're running behind another
    proxy. Since bugzilla will treat this the same as Host, strip
    it out as well.

 proxy/splinter_proxy.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/proxy/splinter_proxy.py b/proxy/splinter_proxy.py
index c93fe3a..a3e811f 100755
--- a/proxy/splinter_proxy.py
+++ b/proxy/splinter_proxy.py
@@ -130,7 +130,7 @@ class ProxyHandler(SimpleHTTPRequestHandler):
                 content_length = long(value)
             # httplib.py will send an appropriate Host: header, we'll send
             # the cookies for our "session" with Bugzilla ourselves
-            if not header.lower() in ('cookie', 'host'):
+            if not header.lower() in ('cookie', 'host', 'x-forwarded-host', 'x-forwarded-server'):
                 connection.putheader(header, value)
         if login_cookie_header is not None:
             connection.putheader('Cookie', login_cookie_header)
@@ -189,7 +189,7 @@ class ProxyHandler(SimpleHTTPRequestHandler):
             # We additionally exclude content-length since it would
             # be referring to the data sent with an original POST and
             # we're not sending that data with the redirected GET
-            if not header.lower() in ('cookie', 'host', 'content-length'):
+            if not header.lower() in ('cookie', 'host',  'x-forwarded-host', 'x-forwarded-server', 
'content-length'):
                 connection.putheader(header, value)
         if login_cookie_header is not None:
             connection.putheader('Cookie', login_cookie_header)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]