Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r246 r253 11 11 0.2.1: 12 12 * Fixed a serious security bug in which /screenshot prompted no auth. Also 13 fixed sending the wrong Content-Lenght for the screenshot. 13 fixed sending the wrong Content-Lenght for the screenshot. Report Itaka 14 version on HTTP headers. 14 15 15 16 0.2 (I've been watching you...): -
trunk/server.py
r249 r253 94 94 getattr(self, name).putChild(path, resource) 95 95 96 def create_site(self, resource ):96 def create_site(self, resource, version_header='TwistedWeb/' + twisted.copyright.version): 97 97 """ 98 98 Creates a Twisted.server.Site with a Twisted Resource … … 100 100 @type resource: instance 101 101 @param resource: An instance of a Twisted resource created with L{add_static_resource} 102 """ 103 102 103 @type version_header: str 104 @param version_header: The 'Server: str' that is sent on HTTP headers. Defaults to Twisted's. 105 """ 106 server.version = version_header 104 107 self.site = server.Site(resource) 105 108 … … 203 206 self.add_child_to_resource('root', 'favicon.ico', FileResource(self.gui, self.authresource, os.path.join(self.itaka_globals.image_dir, 'favicon.ico'), 'image/x-icon')) 204 207 205 self.create_site(self.root )208 self.create_site(self.root, 'Itaka/%s (TwistedWeb/%s)' % (self.itaka_globals.__version__, twisted.copyright.version)) 206 209 207 210 … … 340 343 """ 341 344 345 self.children = {} 346 342 347 self.gui = gui_instance 343 348 self.auth = auth_instance 344 349 self.configuration = self.gui.configuration 345 350 346 # Inherited from the actual code of Twisted's static.Data347 self.children = {}348 351 self.data = data 349 352 self.size = str(len(self.data)) … … 394 397 """ 395 398 399 self.children = {} 400 396 401 self.gui = gui_instance 397 402 self.auth = auth_instance 398 403 self.itaka_globals = self.gui.itaka_globals 399 404 400 405 self.type = type 401 406 self.data = open(path, 'rb').read() … … 439 444 """ 440 445 446 self.children = {} 447 441 448 self.gui = gui_instance 442 449 self.auth = auth_instance 443 450 self.console = self.gui.console 444 451 self.itaka_globals = self.gui.itaka_globals 452 445 453 self.screenshot = screenshot.Screenshot(self.gui) 446 454
Note: See TracChangeset
for help on using the changeset viewer.

