Fixed #4898 -- Fixed a precendence problem when constructing HTTP Date header.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@5721 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2007-07-17 04:22:11 +00:00
parent 62f207caef
commit c92ce31d60
1 changed files with 1 additions and 1 deletions

View File

@ -376,7 +376,7 @@ class ServerHandler(object):
self._write('HTTP/%s %s\r\n' % (self.http_version,self.status)) self._write('HTTP/%s %s\r\n' % (self.http_version,self.status))
if 'Date' not in self.headers: if 'Date' not in self.headers:
self._write( self._write(
'Date: %s\r\n' % formatdate()[:26] + "GMT" 'Date: %s\r\n' % (formatdate()[:26] + "GMT")
) )
if self.server_software and 'Server' not in self.headers: if self.server_software and 'Server' not in self.headers:
self._write('Server: %s\r\n' % self.server_software) self._write('Server: %s\r\n' % self.server_software)