]> khamidou — GitHub mirrors - tunnel.git/commitdiff
playing with repr
authorkhamidou <khamidou@gmail.com>
Tue, 8 Dec 2009 20:12:28 +0000 (21:12 +0100)
committerkhamidou <khamidou@gmail.com>
Tue, 8 Dec 2009 20:12:28 +0000 (21:12 +0100)
tunnel.py

index ae07d5ab886a5b4c7f653b34f3a4a97baa583015..fbf81ab287aac521018dc70fef222d3958d341e3 100755 (executable)
--- a/tunnel.py
+++ b/tunnel.py
@@ -24,17 +24,11 @@ class ProxyHandler (BaseHTTPServer.BaseHTTPRequestHandler):
 
     def do_GET(self):
             headers = {"Proxy-Connection" : "",
-                       "User-Agent" : "Mozilla/5.0 (X11; U; Linux i686) Gecko/20071127 Firefox/2.0.0.11",
-                       "Accept" : "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
-                       "Accept-Language": "fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3",
-                       "Accept-Encoding": "gzip,deflate",
-                       "Accept-Charset": "ISO-8859-1,utf-8;q=0.7,*;q=0.7",
-                       "Keep-Alive": "300",
                        "Proxy-Connection": "keep-alive",
-
            }
-            req = urllib2.Request(self.path, headers=headers) 
-            print self.headers
+
+            req = urllib2.Request(self.path, headers=repr(self.headers)) 
+
             try:
                data = urllib2.urlopen(req)
                 self.send_response(200)