On Wed, Apr 07, 2004 at 05:01:24PM -0500, Jason E. Sibre wrote: > http://www.quixote.ca/qx/PatchesFor_2e7a3 I've applied the XML-RPC patch and the multiple header patch to Medusa. A revised version of the Quixote portion of the multiple-header patch is below. --amk Index: medusa_http.py =================================================================== --- medusa_http.py (revision 64) +++ medusa_http.py (revision 211) @@ -13,7 +13,7 @@ import asyncore, rfc822, socket from StringIO import StringIO -from quixote.server.medusa import http_server, xmlrpc_handler +from medusa import http_server, xmlrpc_handler from quixote.http_request import HTTPRequest from quixote.http_response import Stream from quixote.publish import Publisher @@ -113,9 +113,14 @@ # Copy headers from Quixote's HTTP response for name, value in qresponse.generate_headers(): - # XXX Medusa's HTTP request is buggy, and only allows unique - # headers. - request[name] = value + if hasattr(request, 'add_header'): + request.add_header(name, value) + elif request.has_key(name): + # Multiple headers with the same name are folded into + # a single line, following RFC2616, sect. 4.2 + request[name] += ',' + value + else: + request[name] = value request.response(qresponse.status_code)