changeset 1063:e30022bc628f

standalone headers: make better use of BaseHTTPServer api
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Wed, 26 Jul 2006 12:40:54 +0200
parents 9d13bc34ac0a
children a8ea94a0cbe8
files MoinMoin/request/STANDALONE.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/request/STANDALONE.py	Wed Jul 26 12:32:53 2006 +0200
+++ b/MoinMoin/request/STANDALONE.py	Wed Jul 26 12:40:54 2006 +0200
@@ -98,6 +98,8 @@
         status_code = int(status_code)
         self.sareq.send_response(status_code, status_msg)
         for header in other_headers:
-            self.write("%s\r\n" % header)
-        self.write("\r\n")
+            key, value = header.split(':', 1)
+            value = value.lstrip()
+            self.sareq.send_header(key, value)
+        self.sareq.end_headers()