user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 1/8] nntp: HDR allows metadata prefixed with ':'
  2015-09-25  2:27  5% [PATCH 0/8] nntp: more fixes and tiny speedups Eric Wong
@ 2015-09-25  2:27  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2015-09-25  2:27 UTC (permalink / raw)
  To: meta

RFC 3977, section 8.5.2 states metadata lookups can be done
with HDR.
---
 lib/PublicInbox/NNTP.pm | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/PublicInbox/NNTP.pm b/lib/PublicInbox/NNTP.pm
index 6c661a1..c2f9717 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;
-- 
EW


^ permalink raw reply related	[relevance 7%]

* [PATCH 0/8] nntp: more fixes and tiny speedups
@ 2015-09-25  2:27  5% Eric Wong
  2015-09-25  2:27  7% ` [PATCH 1/8] nntp: HDR allows metadata prefixed with ':' Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2015-09-25  2:27 UTC (permalink / raw)
  To: meta

Still trying my best to avoid introducing more metadata or Xapian
index overhead to support OVER/XOVER, but it seems futile at this
point.

Eric Wong (8):
      nntp: HDR allows metadata prefixed with ':'
      nntp: consistently use 501 for unsupported LIST
      searchidx: remove unused sub: next_doc_id
      nntp: do not repeat result on blocked write
      nntp: prefix FD on every log line
      git: signal-safety for pipe writes
      git: use fields for GitCatFile
      nntp: avoid signals for long responses

 lib/PublicInbox/GitCatFile.pm | 17 +++++++----------
 lib/PublicInbox/NNTP.pm       | 30 ++++++++++++++----------------
 lib/PublicInbox/SearchIdx.pm  |  2 --
 3 files changed, 21 insertions(+), 28 deletions(-)


^ permalink raw reply	[relevance 5%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2015-09-25  2:27  5% [PATCH 0/8] nntp: more fixes and tiny speedups Eric Wong
2015-09-25  2:27  7% ` [PATCH 1/8] nntp: HDR allows metadata prefixed with ':' Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

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).