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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 24, 2006 at 12:52:13PM +1300, Martin Langhoff wrote:

> 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";
}

-Peff
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]