unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH ssoma] mda: strip out the Bytes header, too
@ 2015-09-22  0:15 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2015-09-22  0:15 UTC (permalink / raw)
  To: meta; +Cc: Eric Wong

We will not allow the Bytes header in the repository, either.
This could be set by some news servers and is every bit as
misleading as Content-Length.
---
 Documentation/ssoma_repository.txt | 4 ++--
 lib/Ssoma/MDA.pm                   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/ssoma_repository.txt b/Documentation/ssoma_repository.txt
index 4685435..1303afd 100644
--- a/Documentation/ssoma_repository.txt
+++ b/Documentation/ssoma_repository.txt
@@ -53,8 +53,8 @@ and use of public-inbox.
 # HEADERS
 
 The Message-ID (case-insensitive) header is required.
-"Lines" and "Content-Length" headers are stripped and not allowed,
-they can interfere with further processing.
+"Bytes", "Lines" and "Content-Length" headers are stripped and not
+allowed, they can interfere with further processing.
 When using ssoma with public-inbox-mda, the "Status" mbox header
 is also stripped as that header makes no sense in a public archive.
 
diff --git a/lib/Ssoma/MDA.pm b/lib/Ssoma/MDA.pm
index 46dd79e..8fe4fd6 100644
--- a/lib/Ssoma/MDA.pm
+++ b/lib/Ssoma/MDA.pm
@@ -136,7 +136,7 @@ sub deliver {
 	my $path = $git->mid2path($mid);
 
 	# kill potentially confusing/misleading headers
-	foreach my $d (qw(lines content-length)) {
+	foreach my $d (qw(bytes lines content-length)) {
 		$mime->header_set($d);
 	}
 
-- 
EW


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-22  0:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-22  0:15 [PATCH ssoma] mda: strip out the Bytes header, too Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).