Changeset 1587
- Timestamp:
- 01/05/07 10:58:52
- Files:
-
- trunk/cherrypy/wsgiserver.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/wsgiserver.py
r1586 r1587 364 364 try: 365 365 for chunk in response: 366 self.write(chunk) 366 # "The start_response callable must not actually transmit 367 # the response headers. Instead, it must store them for the 368 # server or gateway to transmit only after the first 369 # iteration of the application return value that yields 370 # a NON-EMPTY string, or upon the application's first 371 # invocation of the write() callable." (PEP 333) 372 if chunk: 373 self.write(chunk) 367 374 finally: 368 375 if hasattr(response, "close"): … … 415 422 self.sent_headers = True 416 423 self.send_headers() 417 if self.chunked_write and len(chunk):418 buf = [hex(len(chunk))[2:],419 "\r\n", chunk, "\r\n"]424 425 if self.chunked_write and chunk: 426 buf = [hex(len(chunk))[2:], "\r\n", chunk, "\r\n"] 420 427 self.sendall("".join(buf)) 421 428 else:

