lib/PublicInbox/EmlContentFoo.pm | 10 ---------- lib/PublicInbox/WwwAttach.pm | 3 +-- t/eml_content_type.t | 4 ---- diff --git a/lib/PublicInbox/EmlContentFoo.pm b/lib/PublicInbox/EmlContentFoo.pm index e6005d290c933b1575bdc795123b6c1ae67ccc79..c163eaf5183d4a8372be578b0a0ec23e05bcb4bd 100644 --- a/lib/PublicInbox/EmlContentFoo.pm +++ b/lib/PublicInbox/EmlContentFoo.pm @@ -102,11 +102,6 @@ { type => $type, subtype => $subtype, attributes => $attributes, - - # This is dumb. Really really dumb. For backcompat. -- rjbs, - # 2013-08-10 - discrete => $type, - composite => $subtype, }; } @@ -300,11 +295,6 @@ This routine parses email content type headers according to section 5.1 of RFC 2045 and also RFC 2231 (Character Set and Parameter Continuations). It returns a hash as above, with entries for the C, the C, and a hash of C. - -For backward compatibility with a really unfortunate misunderstanding of RFC -2045 by the early implementors of this module, C and C are -also present in the returned hashref, with the values of C and C -respectively. =func parse_content_disposition diff --git a/lib/PublicInbox/WwwAttach.pm b/lib/PublicInbox/WwwAttach.pm index 754da13ffded9b0bb00360397140f133b8b7ec39..7e8496d7ab9c59c4a55670860d2255b02e7d7289 100644 --- a/lib/PublicInbox/WwwAttach.pm +++ b/lib/PublicInbox/WwwAttach.pm @@ -17,8 +17,7 @@ $res->[0] = 200; my $ct = $part->content_type; $ct = parse_content_type($ct) if $ct; - # discrete == type, we remain Debian wheezy-compatible - if ($ct && (($ct->{discrete} || '') eq 'text')) { + if ($ct && (($ct->{type} || '') eq 'text')) { # display all text as text/plain: my $cset = $ct->{attributes}->{charset}; if ($cset && ($cset =~ /\A[a-zA-Z0-9_\-]+\z/)) { diff --git a/t/eml_content_type.t b/t/eml_content_type.t index 5fd7d1d98c4985a1babbd868e79a338c069af797..5acd51ad74751363152f60e4e52c1e3b129366c7 100644 --- a/t/eml_content_type.t +++ b/t/eml_content_type.t @@ -260,10 +260,6 @@ sub test { my ($string, $expect, $info) = @_; - # So stupid. -- rjbs, 2013-08-10 - $expect->{discrete} = $expect->{type}; - $expect->{composite} = $expect->{subtype}; - local $_; $info =~ s/\r/\\r/g; $info =~ s/\n/\\n/g;