Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 831

Show
Ignore:
Timestamp:
11/21/05 19:12:44
Author:
fumanchu
Message:

Some code was setting response.body to a string instead of a [string].

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/_cperror.py

    r793 r831  
    124124                   307: "This resource has moved temporarily to <a href='%s'>%s</a>.", 
    125125                   }[status] 
    126             cherrypy.response.body = "<br />\n".join([msg % (url, url) 
    127                                                  for url in self.urls]) 
     126            cherrypy.response.body = ["<br />\n".join([msg % (url, url) 
     127                                                  for url in self.urls])] 
    128128        elif status == 304: 
    129129            # Not Modified. 
  • trunk/cherrypy/_cputil.py

    r830 r831  
    261261    # so don't bother cleaning up response values here. 
    262262    response.status = status 
    263     response.body = getErrorPage(status, traceback=tb, message=message) 
    264     response.headerMap['Content-Length'] = len(response.body) 
     263    content = getErrorPage(status, traceback=tb, message=message) 
     264    response.body = [content] 
     265    response.headerMap['Content-Length'] = len(content) 
    265266    response.headerMap['Content-Type'] = "text/html" 
    266267     
  • trunk/cherrypy/filters/encodingfilter.py

    r821 r831  
    2424            def encode_body(encoding): 
    2525                try: 
    26                     response.body = response.body.encode(encoding) 
     26                    response.body = [response.body.encode(encoding)] 
    2727                except UnicodeError: 
    2828                    # Try the next encoding 

Hosted by WebFaction

Log in as guest/cpguest to create tickets