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]

 



"Martin Langhoff (CatalystIT)" <martin@xxxxxxxxxxxxxxx> writes:

> Junio C Hamano wrote:
>> Except that this statement made me go "huh?" wondering what it
>> would do to the $filehandle to evaluate <$filehandle> in a void
>> context:
>>
>> +			# Skip the empty line of the proxy server output
>> +			<$s>;
>
> It's a perl idiom that will discard one line of the $filehandle. If we
> are 200% certain that it is empty, then it's fine. OTOH, it may well
> be a bug in the particular proxy implementation Iñaki is using -- I
> don't know enough about CVS proxying to tell.

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.

By the way does anybody know where this behaviour is officially
specified?  Luotonen's draft-luotonen-web-proxy-tunneling-01.txt
is pretty clear about the empty line that comes after the
response headers, but that document being an internet-draft has
expired long time ago, but still seem to be quoted by others.

>> The "I/O Operators" section talks about evaluating <$s> in a
>> scalar context (i.e. "$rep = <$s>"), which we all know would
>> return a single line, and in list context, which swallows
>
> This is in scalar context, and that's safe to rely on.

If it were in scalar context I would agree fully.  That
behaviour is documented.  But my point is that it is in void
context, and I did not find document specifying what should
happen.

-
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]