X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FIMAP.pm;h=fe3c7d1a85bba20174642fb9399dce902bcdf0f8;hb=4aa27d61cbf10fdad098b20ae4bcef8f4893e531;hp=3cc68e668720814a9135ace5901ce43af2cf02c3;hpb=12b21f035cc223ea3782bef7102160cc3f0ee214;p=public-inbox.git diff --git a/lib/PublicInbox/IMAP.pm b/lib/PublicInbox/IMAP.pm index 3cc68e66..fe3c7d1a 100644 --- a/lib/PublicInbox/IMAP.pm +++ b/lib/PublicInbox/IMAP.pm @@ -792,6 +792,7 @@ sub partial_hdr_not { } my $str = $eml->header_obj->as_string; $str =~ s/$hdrs_re//g; + $str =~ s/(?header_obj->as_string; - join('', ($str =~ m/($hdrs_re)/g), "\r\n"); + $str = join('', ($str =~ m/($hdrs_re)/g)); + $str =~ s/(?[2] = hdrs_regexp($3); - $$need |= CRLF_HDR|EML_HDR; + + # don't emit CRLF_HDR instruction, here, partial_hdr_* + # will do CRLF conversion with only the extracted result + # and not waste time converting lines we don't care about. + $$need |= EML_HDR; } else { undef; }