summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMark Sapiro2016-11-01 11:51:17 -0700
committerMark Sapiro2016-11-01 11:51:17 -0700
commit2adcc70b65749c8fe616ac61c93765aade75c783 (patch)
treec3fcf0531d68f4f14ee59de1c911460b7ee3a56f /src
parentc77e6918d80a5aeab557f9f171594c858ef926f5 (diff)
parent366dc6517716b7c77c4b7a76559b1b6b5996fc8e (diff)
downloadmailman-2adcc70b65749c8fe616ac61c93765aade75c783.tar.gz
mailman-2adcc70b65749c8fe616ac61c93765aade75c783.tar.zst
mailman-2adcc70b65749c8fe616ac61c93765aade75c783.zip
Diffstat (limited to 'src')
-rw-r--r--src/mailman/docs/NEWS.rst3
-rw-r--r--src/mailman/rest/tests/test_basic.py8
-rw-r--r--src/mailman/rest/wsgiapp.py2
-rw-r--r--src/mailman/runners/digest.py3
-rw-r--r--src/mailman/runners/tests/test_digest.py3
5 files changed, 19 insertions, 0 deletions
diff --git a/src/mailman/docs/NEWS.rst b/src/mailman/docs/NEWS.rst
index 33f886d6f..f72498a1d 100644
--- a/src/mailman/docs/NEWS.rst
+++ b/src/mailman/docs/NEWS.rst
@@ -95,6 +95,8 @@ Bugs
edit to work. (Closes: #290)
* Prevent posting from banned addresses. Given by Aurélien Bompard.
(Closes: #283)
+ * Remove the digest mbox files after the digests are sent. Given by Aurélien
+ Bompard. (Closes: #259)
Configuration
-------------
@@ -175,6 +177,7 @@ REST
3.0 except that UUIDs are represented as hex strings instead of 128-bit
integers, since the latter are not compatible with all versions of
JavaScript. (Closes #121)
+ * REST clients must minimally support HTTP/1.1. (Closes #288)
* The new template system is introduced for API 3.1. See
``src/mailman/rest/docs/templates.rst`` for details. (Closes #249)
* When creating a user via REST using an address that already exists, but
diff --git a/src/mailman/rest/tests/test_basic.py b/src/mailman/rest/tests/test_basic.py
index 64c60842c..23db57f8e 100644
--- a/src/mailman/rest/tests/test_basic.py
+++ b/src/mailman/rest/tests/test_basic.py
@@ -26,6 +26,7 @@ from mailman.app.lifecycle import create_list
from mailman.database.transaction import transaction
from mailman.testing.helpers import call_api
from mailman.testing.layers import RESTLayer
+from urllib.error import HTTPError
class TestBasicREST(unittest.TestCase):
@@ -45,3 +46,10 @@ class TestBasicREST(unittest.TestCase):
# This fails with Falcon 0.2; passes with Falcon 0.3.
self.assertEqual(self._mlist.description,
'A description with , to check stuff')
+
+ def test_send_error(self):
+ # GL#288 working around Python bug #28548. The improperly encoded
+ # space in the URL breaks error reporting due to default HTTP/0.9.
+ with self.assertRaises(HTTPError) as cm:
+ call_api('http://localhost:9001/3.0/lists/test @example.com')
+ self.assertEqual(cm.exception.code, 400)
diff --git a/src/mailman/rest/wsgiapp.py b/src/mailman/rest/wsgiapp.py
index f3290416e..3ba122c00 100644
--- a/src/mailman/rest/wsgiapp.py
+++ b/src/mailman/rest/wsgiapp.py
@@ -65,6 +65,8 @@ class StderrLogger:
class AdminWebServiceWSGIRequestHandler(WSGIRequestHandler):
"""Handler class which just logs output to the right place."""
+ default_request_version = 'HTTP/1.1'
+
def log_message(self, format, *args):
"""See `BaseHTTPRequestHandler`."""
log.info('%s - - %s', self.address_string(), format % args)
diff --git a/src/mailman/runners/digest.py b/src/mailman/runners/digest.py
index c591c10a9..4971965fa 100644
--- a/src/mailman/runners/digest.py
+++ b/src/mailman/runners/digest.py
@@ -17,6 +17,7 @@
"""Digest runner."""
+import os
import re
import logging
@@ -369,3 +370,5 @@ class DigestRunner(Runner):
recipients=rfc1153_recipients,
listid=mlist.list_id,
isdigest=True)
+ # Remove the digest mbox. (GL #259)
+ os.remove(msgdata['digest_path'])
diff --git a/src/mailman/runners/tests/test_digest.py b/src/mailman/runners/tests/test_digest.py
index 6157f500b..5246ef670 100644
--- a/src/mailman/runners/tests/test_digest.py
+++ b/src/mailman/runners/tests/test_digest.py
@@ -75,6 +75,9 @@ class TestDigest(unittest.TestCase):
bart.preferences.delivery_mode = DeliveryMode.plaintext_digests
make_digest_messages(self._mlist)
self._check_virgin_queue()
+ # The digest mbox and all intermediary mboxes must have been removed
+ # (GL #259).
+ self.assertEqual(os.listdir(self._mlist.data_path), [])
def test_non_ascii_message(self):
# Subscribe some users receiving digests.