fixed UD web interface page load crash in respondCustom

This commit is contained in:
Darren Ranalli 2010-07-27 19:11:01 +00:00
parent 1759e6859a
commit 570ffe14e2
1 changed files with 2 additions and 2 deletions

View File

@ -45,12 +45,12 @@ class WebRequest(object):
self.connection.SendThisResponse(encodedUtf8(msg))
def respondCustom(self,contentType,body):
msg = u"HTTP/1.0 200 OK\r\nContent-Type: %s" % contentType
msg = "HTTP/1.0 200 OK\r\nContent-Type: %s" % contentType
if contentType in ["text/css",]:
msg += "\nCache-Control: max-age=313977290\nExpires: Tue, 02 May 2017 04:08:44 GMT\n"
msg += u"\r\n\r\n%s" % (body)
msg += "\r\n\r\n%s" % (body)
self.connection.SendThisResponse(msg)
def timeout(self):