From: Christian Couder <chriscool@tuxfamily.org>
To: Inaki Arenaza <iarenuno@eteo.mondragon.edu>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-cvsimport: add suport for CVS pserver method HTTP/1.x proxying
Date: Fri, 24 Nov 2006 05:48:00 +0100 [thread overview]
Message-ID: <200611240548.00840.chriscool@tuxfamily.org> (raw)
In-Reply-To: <11642344172790-git-send-email-iarenuno@eteo.mondragon.edu>
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,
next prev parent reply other threads:[~2006-11-24 4:40 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-22 22:26 [PATCH] git-cvsimport: add suport for CVS pserver method HTTP/1.x proxying Inaki Arenaza
[not found] ` <7v64 d5keke.fsf@assigned-by-dhcp.cox.net>
2006-11-23 22:01 ` Junio C Hamano
2006-11-23 22:09 ` Martin Langhoff (CatalystIT)
2006-11-23 23:02 ` Junio C Hamano
2006-11-23 23:20 ` Martin Langhoff (CatalystIT)
2006-11-23 23:52 ` Martin Langhoff
2006-11-24 0:24 ` Junio C Hamano
2006-11-25 12:43 ` Ignacio Arenaza
2006-11-24 1:42 ` Jeff King
2006-11-24 2:54 ` Junio C Hamano
2006-11-24 8:43 ` Ignacio Arenaza
2006-11-24 8:46 ` Ignacio Arenaza
2006-11-24 8:57 ` Junio C Hamano
2006-11-24 9:05 ` Ignacio Arenaza
2006-11-24 11:48 ` Junio C Hamano
2006-11-27 16:27 ` Ignacio Arenaza
2006-11-24 14:57 ` Jeff King
2006-11-24 4:48 ` Christian Couder [this message]
2006-11-24 8:41 ` Ignacio Arenaza
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200611240548.00840.chriscool@tuxfamily.org \
--to=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=iarenuno@eteo.mondragon.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).