If I use here the following:
print "[", key, ":", value,"]"
I get:
2008-12-16 15:37:21+0200 [WordCountProxyClient,client] [ Cache-Control : no-cache, no-store, max-age=0, must-revalidate ]
2008-12-16 15:37:21+0200 [WordCountProxyClient,client] [ Pragma : no-cache ]
2008-12-16 15:37:21+0200 [WordCountProxyClient,client] [ Expires : Fri, 01 Jan 1990 00:00:00 GMT ]
2008-12-16 15:37:21+0200 [WordCountProxyClient,client] [ Date : Tue, 16 Dec 2008 13:37:21 GMT ]
2008-12-16 15:37:21+0200 [WordCountProxyClient,client] [ Content-Type : text/javascript; charset=UTF-8 ]
2008-12-16
15:37:21+0200 [WordCountProxyClient,client] [ Set-Cookie :
GMAIL_STAT_3492=EXPIRED; Expires=Mon, 15-Dec-2008 13:37:21 GMT; Path=/a/
dragusin.ro ]
2008-12-16 15:37:21+0200 [WordCountProxyClient,client] [ Set-Cookie :
GMAIL_IMP=EXPIRED; Expires=Mon, 15-Dec-2008 13:37:21 GMT; Path=/a/
dragusin.ro ]
2008-12-16 15:37:21+0200 [WordCountProxyClient,client] [ Content-Encoding : gzip ]
2008-12-16 15:37:21+0200 [WordCountProxyClient,client] [ X-Content-Type-Options : nosniff ]
2008-12-16 15:37:21+0200 [WordCountProxyClient,client] [ Content-Length : 14340 ]
2008-12-16 15:37:21+0200 [WordCountProxyClient,client] [ Server : GFE/1.3 ]
2008-12-16 15:37:21+0200 [WordCountProxyClient,client] [ Connection : Close ]
2008-12-16 15:37:22+0200 [WordCountProxyClient,client] [ Cache-Control : private, max-age=0 ]
2008-12-16 15:37:22+0200 [WordCountProxyClient,client] [ Date : Tue, 16 Dec 2008 13:37:21 GMT ]
2008-12-16 15:37:22+0200 [WordCountProxyClient,client] [ Expires : -1 ]
2008-12-16 15:37:22+0200 [WordCountProxyClient,client] [ Content-Type : text/html; charset=UTF-8 ]
2008-12-16 15:37:22+0200 [WordCountProxyClient,client] [ Content-Encoding : gzip ]
2008-12-16 15:37:22+0200 [WordCountProxyClient,client] [ Server : gws ]
2008-12-16 15:37:22+0200 [WordCountProxyClient,client] [ Content-Length : 2597 ]
2008-12-16 15:37:22+0200 [WordCountProxyClient,client] [ Connection : Close ]
So that is the response header.
I need to override the request header, the one that the browser sends to the proxy server.
See below:
the print above prints:
received_headers: {'accept-language':
'en-us,en;q=0.5', 'accept-encoding': 'gzip,deflate', 'keep-alive':
'300', 'accept': 'text/html,application/xhtml+
xml,application/xml;q=0.9,*/*;q=0.8',
'user-agent': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.4)
Gecko/2008111318 Ubuntu/8.10 (intrepid) Firefox/3.0.4',
'accept-charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'host': '
www.google.com', 'cookie': 'PREF=ID=cfb3eb179de0c1e6:LD=en:NR=100:CR=2:TM=1228315308:LM=1229032156:GM=1:S=ImAuEufbnV6S7BAz; NID=17=lOVMiFLculcrfN-zUO7xxFTTUFzqQqaHOFHcG_BDmYFX8QKYbMoo7GrDoYH-8ASPBlVijG_Hstp7HSDQ_8WQexHPjwz6g_7ZVpBhwmh3vkKuO3jpf9dnzrnWthcW1mGh; S=photos_html=6ScUGfd699g4Xuuh0FeizA; TZ=-120', 'cache-control': 'max-age=0', 'proxy-connection': 'keep-alive'}
these are the values I want to modify, the 'accept-encoding', to be specific. How can I do it?
Thank you!