Ticket #311: Paste-1.7.2-fix-truncated-output.diff

File Paste-1.7.2-fix-truncated-output.diff, 0.6 KB (added by mgedmin, 4 years ago)

patch to set Content-Length correctly

  • ./paste/debug/profile.py

    patch generated by mg on Fri Nov  7 22:45:07 EET 2008
    
    diff -up ./paste/debug/profile.py.orig ./paste/debug/profile.py
    old new  
    7979                stats.print_callers, self.limit) 
    8080            body += '<pre style="%s">%s\n%s</pre>' % ( 
    8181                self.style, cgi.escape(output), cgi.escape(output_callers)) 
     82            response.replace_header(headers, 'Content-Length', str(len(body))) 
    8283            return [body] 
    8384        finally: 
    8485            self.lock.release()