~francesco-marella/specto/blacklist-plugins

« back to all changes in this revision

Viewing changes to spectlib/plugins/watch_web_static.py

Merge the full fix for issue 267: Specto should provide its name in user agent

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
                opener = web_proxy.urllib2.build_opener(auth_hndlr)
100
100
            else:
101
101
                opener = web_proxy.urllib2.build_opener()
102
 
            request = web_proxy.urllib2.Request(self.uri, None, {"Accept-encoding": "gzip"})
 
102
            self.user_agent = "Specto/" + self.specto.VERSION + " +http://specto.sf.net"
 
103
            request = web_proxy.urllib2.Request(self.uri, None, {"Accept-encoding": "gzip",'User-Agent':self.user_agent})
103
104
            cache_res = ""
104
105
            if (self.cached == 1) or (os.path.exists(self.cacheFullPath_)):
105
106
                self.cached = 1