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

Changeset 227

Show
Ignore:
Timestamp:
06/01/05 15:44:39
Author:
fumanchu
Message:

Fixed error handling in wsgi; wasn't returning body.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/ticket-151/cherrypy/_cpdefaults.py

    r219 r227  
    4848        level = "ERROR" 
    4949    else: 
    50         lebel = "UNKNOWN" 
     50        level = "UNKNOWN" 
    5151    try: 
    5252        logToScreen = cpg.config.get('server.logToScreen') 
  • branches/ticket-151/cherrypy/_cphttptools.py

    r219 r227  
    261261    body = "Unrecoverable error in the server." 
    262262    if extrabody is not None: 
    263         body += extra_body 
     263        body += "\n" + extrabody 
    264264    return ("500 Internal Server Error", 
    265265            [('Content-Type', 'text/plain'), 
  • branches/ticket-151/cherrypy/_cpthreadinglocal.py

    r149 r227  
    152152 
    153153        # We need to create the thread dict in anticipation of 
    154         # __init__ being called, to make sire we don't cal it 
     154        # __init__ being called, to make sure we don't call it 
    155155        # again ourselves. 
    156156        dict = object.__getattribute__(self, '__dict__') 
  • branches/ticket-151/cherrypy/_cpwsgi.py

    r216 r227  
    9393            # not take any time at all if chunk is already of type "str". 
    9494            # If it's unicode, it could be a big performance hit (x ~500). 
    95             chunk = str(chunk) 
    96             yield chunk 
     95            yield str(chunk) 
    9796    except: 
    9897        tb = _cphttptools.formatExc() 
    9998        _cputil.getSpecialFunction('_cpLogMessage')(tb) 
    100         s, h, b = _cphttptools.bareError() 
    101         start_response(s, headers, sys.exc_info()) 
     99        s, h, b = _cphttptools.bareError(tb) 
     100        start_response(s, h, sys.exc_info()) 
     101        for chunk in b: 
     102            yield str(chunk) 
    102103 
    103104 

Hosted by WebFaction

Log in as guest/cpguest to create tickets