summaryrefslogtreecommitdiffstats
path: root/apps/patchwork/views
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2014-11-22 20:38:42 -0800
committerJeremy Kerr <jk@ozlabs.org>2015-03-22 21:08:30 +0800
commit8d4b4c7ee342115b50d539dc8a07c5a6178aa508 (patch)
tree22266448172377384b952bf8ef58d2b29179c594 /apps/patchwork/views
parent5b88d0325ee803ae470cdcdea9207c12ee2ef16e (diff)
downloadpatchwork-8d4b4c7ee342115b50d539dc8a07c5a6178aa508.tar.bz2
patchwork-8d4b4c7ee342115b50d539dc8a07c5a6178aa508.tar.xz
xmlrpc: include UNIX mbox 'From ' header in patch_get_mbox()
This function is misleadingly named 'mbox'; the contents do not begin with a proper 'From xxx <date>' separator line. (Notably, the mbox format does not have an authoritative standard, but at least this basic 'separator' construct is noted in http://tools.ietf.org/html/rfc4155.) The Message.as_string() function takes an optional [unixfrom] boolean argument. Let's use it, like we do everywhere else (including in the web interface 'mbox' link). Among other things, this means that we can straightforwardly concatenate the output of patch_get_mbox(), and more tools can use this output as-is. Example header: >From patchwork Fri Nov 21 18:24:29 2014 ... Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'apps/patchwork/views')
-rw-r--r--apps/patchwork/views/xmlrpc.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/patchwork/views/xmlrpc.py b/apps/patchwork/views/xmlrpc.py
index a109866..e188eb3 100644
--- a/apps/patchwork/views/xmlrpc.py
+++ b/apps/patchwork/views/xmlrpc.py
@@ -381,7 +381,7 @@ def patch_get_mbox(patch_id):
"""Return mbox string for the given patch ID."""
try:
patch = Patch.objects.filter(id = patch_id)[0]
- return patch_to_mbox(patch).as_string()
+ return patch_to_mbox(patch).as_string(True)
except:
return ""