Graham Fawcett wrote: > I've got a patch that seems to solve the problem... for me, anyway. > Instead of pushing the content of the response to Medusa as a string, I > push a Medusan file_producer, wrapped around the already-built StringIO, > output_file. Before you go patching your legion of Quixote/Medusa servers, there's a serious problem with the first revision of the patch that I posted yesterday. I hadn't realized it before I posted it to the list, but the patch causes response headers to be duplicated, and to appear as content in the browser. Sorry about that... This patch correctly rewinds the output only to the start of the body, not to the start of the headers, thus solving the problem. I've really tested this one with a real Web site this time! -- Graham --- \projects\Quixote-0.6\server\medusa_http.py Wed Jun 04 12:45:35 2003 +++ server\medusa_http.py Wed Jun 04 23:32:38 2003 @@ -13,4 +13,5 @@ from StringIO import StringIO from medusa import http_server, xmlrpc_handler +from medusa.producers import file_producer from quixote.http_request import HTTPRequest from quixote.publish import Publisher @@ -106,5 +107,7 @@ if output: request['Content-Length'] = str(len(output)) - request.push(output) + msg.rewindbody() + out_producer = file_producer(output_file) + request.push(out_producer) request.done()