diff options
author | Eric Wong <e@80x24.org> | 2015-09-25 02:27:50 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-09-25 02:29:04 +0000 |
commit | 037145fecda6383f6d119893015c77ab4d86daf3 (patch) | |
tree | 1d9d2e5319a63f935d445175e3fdba05a3884eba /lib/PublicInbox/NNTP.pm | |
parent | ffd40d6260b01290b2dd060f69ed2c663eba4027 (diff) | |
download | public-inbox-037145fecda6383f6d119893015c77ab4d86daf3.tar.gz |
RFC 3977, section 8.5.2 states metadata lookups can be done with HDR.
Diffstat (limited to 'lib/PublicInbox/NNTP.pm')
-rw-r--r-- | lib/PublicInbox/NNTP.pm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm index 6c661a1b..c2f97177 100644 --- a/lib/PublicInbox/NNTP.pm +++ b/lib/PublicInbox/NNTP.pm @@ -480,9 +480,8 @@ sub get_range ($$) { sub hdr_val ($$) { my ($r, $header) = @_; - $header = lc $header; - return $r->[3] if ($header eq 'bytes'); - return $r->[4] if ($header eq 'lines'); + return $r->[3] if $header =~ /\A:?bytes\z/i; + return $r->[4] if $header =~ /\A:?lines\z/i; $r = $r->[2]->header_obj->header($header); defined $r or return; $r =~ s/[\r\n\t]+/ /sg; |