changeset 1032:e1239c38785c

Merge with main.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Fri, 21 Jul 2006 01:58:43 +0200
parents 86999b189c45 (current diff) 8e1f7ba815b5 (diff)
children 06a2fd20eab7
files
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/Page.py	Fri Jul 21 01:58:16 2006 +0200
+++ b/MoinMoin/Page.py	Fri Jul 21 01:58:43 2006 +0200
@@ -1177,7 +1177,7 @@
                     # XXX The following code is commented because it is incorrect for dynamic pages:
                     #lastmod = os.path.getmtime(self._text_filename())
                     #request.http_headers(["Last-Modified: %s" % timefuncs.formathttpdate(lastmod)])
-                    pass
+                    request.http_headers()
             else:
                 request.http_headers(['Status: 404 NOTFOUND'])
                 request.setResponseCode(404)
--- a/MoinMoin/mail/sendmail.py	Fri Jul 21 01:58:16 2006 +0200
+++ b/MoinMoin/mail/sendmail.py	Fri Jul 21 01:58:43 2006 +0200
@@ -74,7 +74,13 @@
     charset.header_encoding = QP
     charset.body_encoding = QP
     msg.set_charset(charset)
-    msg.set_payload(charset.body_encode(text))
+
+    # work around a bug in python 2.4.3 and above:
+    msg.set_payload('=')
+    if msg.as_string().endswith('='):
+        text = charset.body_encode(text)
+
+    msg.set_payload(text)
 
     # Create message headers
     # Don't expose emails addreses of the other subscribers, instead we