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]

 



Inaki Arenaza wrote:

[...]

>
> +		my ($s, $rep);
> +		if($proxyhost) {
> +
> +			# Use a HTTP Proxy. Only works for HTTP proxies that
> +			# don't require user authentication
> +			#
> +			# See: http://www.ietf.org/rfc/rfc2817.txt
> +
> +			$s = IO::Socket::INET->new(PeerHost => $proxyhost, PeerPort =>
> $proxyport); +			die "Socket to $proxyhost: $!\n" unless defined $s;
> +			$s->write("CONNECT $serv:$port HTTP/1.1\r\nHost:
> $serv:$port\r\n\r\n") +	                        or die "Write to
> $proxyhost: $!\n";
> +	                $s->flush();
> +
> +			$rep = <$s>;
> +
> +			# The answer should loook like 'HTTP/1.x 2yy ....'
> +			if(!($rep =~ m#^HTTP/1\.. 2[0-9][0-9]#)) {
> +				die "Proxy connect: $rep\n";
> +			}
> +			# Skip the empty line of the proxy server output
> +			<$s>;
> +		} else {
> +			my $s = IO::Socket::INET->new(PeerHost => $serv, PeerPort => $port);

It seems that "my " should not be in the above line.

> +			die "Socket to $serv: $!\n" unless defined $s;
> +		}
> +
>  		$s->write("BEGIN AUTH REQUEST\n$repo\n$user\n$pass\nEND AUTH
> REQUEST\n") or die "Write to $serv: $!\n";
>  		$s->flush();

Regards,
Christian.
-
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]