Thread (1 message) 1 message, 1 author, 2016-08-11

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

From: Junio C Hamano <hidden>
Date: 2016-08-11 19:26:09

"Martin Langhoff" [off-list ref] writes:
On 11/24/06, Junio C Hamano [off-list ref] wrote:
quoted
It is more about HTTP proxying and it is my understanding that
response to CONNECT method request has that empty line after the
successful (2xx) response line and zero or more response
headers.  The code is still wrong; it does not have a loop to
discard the potential response headers that come before the
empty line the code we are discussing discards.
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.
Yes, or "1 while (<$s> ne '')" which is listed as an example for
a kosher way to use a constant to express no-op in void context ;-).

        =head2 No-ops
        X<no-op> X<nop>

        Perl doesn't officially have a no-op operator, but the bare constants
        C<0> and C<1> are special-cased to not produce a warning in a void
        context, so you can for example safely do

            1 while foo();
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help