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
Christian Couder <chriscool@tuxfamily.org>
Date
Nov 24, 2006, 04:48 UTC
Message-ID
<200611240548.00840.chriscool@tuxfamily.org>
In-Reply-To
<11642344172790-git-send-email-iarenuno@eteo.mondragon.edu>
Inaki Arenaza wrote:
[...]
Show 26 quoted lines
>
> +		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.
Show 6 quoted lines
> +			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,
Previous: Jeff KingNext: Ignacio Arenaza
Message 18 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.