SVN: r20294 - in trunk/quixote: . server
akuchlin-fVcApmY9cLvQ3/1i3zOLAti2O/[email protected] Mon, 20 Jan 2003 16:50:12 -0500
| Newsgroups | gmane.comp.web.quixote.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: akuchlin
Date: 2003-01-20 16:50:11 -0500 (Mon, 20 Jan 2003)
New Revision: 20294
Modified:
trunk/quixote/CHANGES
trunk/quixote/server/medusa_http.py
Log:
Change Medusa server to match Publisher.publish()
Modified: trunk/quixote/server/medusa_http.py
==============================================================================
--- trunk/quixote/server/medusa_http.py (original)
+++ trunk/quixote/server/medusa_http.py 2003-01-20 16:50:12.000000000 -0500
@@ -14,6 +14,7 @@
from medusa import http_server, xmlrpc_handler
from quixote.http_request import HTTPRequest
from quixote.publish import Publisher
+from quixote.errors import PublishError
class QuixoteHandler:
def __init__ (self, publisher, server_name, server):
@@ -69,9 +70,15 @@
environ[k] = ''
stdin = StringIO(data)
- qreq = HTTPRequest(stdin, environ)
- qreq.process_inputs()
- output = self.publisher.process_request(qreq, environ)
+ qreq = self.publisher.create_request(stdin, environ)
+ try:
+ self.publisher.parse_request(qreq)
+ output = self.publisher.process_request(qreq, environ)
+ except PublishError, err:
+ output = self.publisher.finish_interrupted_request(qreq, err)
+ except:
+ output = self.publisher.finish_failed_request(qreq)
+
if output:
qreq.response.set_body(str(output))
Modified: trunk/quixote/CHANGES
==============================================================================
--- trunk/quixote/CHANGES (original)
+++ trunk/quixote/CHANGES 2003-01-20 16:50:12.000000000 -0500
@@ -1,6 +1,7 @@
0.6b2 (?? ??? 2003):
- * Fix the Medusa HTTP server to work with HTML templates. (David M. Cooke)
+ * Fix the Medusa HTTP server to work with HTML templates (David M. Cooke)
+ and to call finish_failed_request (pointed out by Graham Fawcett).
* Add HTTP_USER_AGENT and ACCEPT_ENCODING to Medusa HTTP server.
(Graham Fawcett)