git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-cvsimport: add suport for CVS pserver method HTTP/1.x proxying

From
Jeff King <peff@peff.net>
Date
Nov 24, 2006, 01:42 UTC
Message-ID
<20061124014205.GA19515@sigio.intra.peff.net>
In-Reply-To
<46a038f90611231552x3e33eec4w7863ce6a1da5781b@mail.gmail.com>
On Fri, Nov 24, 2006 at 12:52:13PM +1300, Martin Langhoff wrote:
Show 8 quoted lines
> You are right. It should be something along the lines of
> 
>  # discard headers until first blank line
>  while (<$s> ne '') {
>      # nothing
>  }
> 
> that is, assuming we can just ignore headers happily.

That code won't work; the value of a blank line will actually be "\n" (or "\r\n"). So you probably want:

while (<$s>) {
  chomp; chomp;
  last unless $_;
}
or perhaps more readably:
while (<$s>) {
  last if $_ eq "\n" || $_ eq "\r\n";
}
Previous: Ignacio ArenazaNext: Junio C Hamano
Message 9 of 19 in “git-cvsimport: add suport for CVS pserver method HTTP/1.x proxying”
  1. git-cvsimport: add suport for CVS pserver method HTTP/1.x proxyingInaki Arenaza, Nov 22, 2006
  2. Junio C HamanoNov 23, 2006
  3. Martin Langhoff (CatalystIT)Nov 23, 2006
  4. Junio C HamanoNov 23, 2006
  5. Martin Langhoff (CatalystIT)Nov 23, 2006
  6. Martin LanghoffNov 23, 2006
  7. Junio C HamanoNov 24, 2006
  8. Ignacio ArenazaNov 25, 2006
  9. Jeff KingNov 24, 2006
  10. Junio C HamanoNov 24, 2006
  11. Ignacio ArenazaNov 24, 2006
  12. Ignacio ArenazaNov 24, 2006
  13. Junio C HamanoNov 24, 2006
  14. Ignacio ArenazaNov 24, 2006
  15. Junio C HamanoNov 24, 2006
  16. Ignacio ArenazaNov 27, 2006
  17. Jeff KingNov 24, 2006
  18. Christian CouderNov 24, 2006
  19. Ignacio ArenazaNov 24, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.