about summary refs log tree commit homepage
path: root/lib/PublicInbox/MsgIter.pm
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-06-10 07:04:10 +0000
committerEric Wong <e@yhbt.net>2020-06-13 07:55:45 +0000
commit686951722e2709b548384b19ad300f5c2642d368 (patch)
treeb999ae03e2f8bde33e813aea21056fd6db8bebe5 /lib/PublicInbox/MsgIter.pm
parentca68e519d588b1fd97d9d4a9c43bbb07534624c2 (diff)
downloadpublic-inbox-686951722e2709b548384b19ad300f5c2642d368.tar.gz
Instead of counts starting at 0, we start the single-part
message at 1 like we do with subparts of a multipart message.
This will make it easier to map offsets for "BODY[$SECTION]"
when using IMAP FETCH, since $SECTION must contain non-zero
numbers according to RFC 3501.

This doesn't make any difference for WWW URLs, since single part
messages cannot have downloadable attachments.
Diffstat (limited to 'lib/PublicInbox/MsgIter.pm')
-rw-r--r--lib/PublicInbox/MsgIter.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/MsgIter.pm b/lib/PublicInbox/MsgIter.pm
index 5ec2a4d9..bb1dfead 100644
--- a/lib/PublicInbox/MsgIter.pm
+++ b/lib/PublicInbox/MsgIter.pm
@@ -34,7 +34,7 @@ sub em_each_part ($$;$$) {
                         }
                 }
         } else {
-                $cb->([$mime, 0, 0], $cb_arg);
+                $cb->([$mime, 0, 1], $cb_arg);
         }
 }