From: Bernhard Reiter <ockham@raz.or.at>
To: Jeff King <peff@peff.net>, Jonathan Nieder <jrnieder@gmail.com>
Cc: git@vger.kernel.org, 434599@bugs.debian.org
Subject: Re: [PATCH/RFC] git-imap-send: use libcurl for implementation
Date: Sun, 17 Aug 2014 14:56:10 +0200 [thread overview]
Message-ID: <53F0A66A.9000909@raz.or.at> (raw)
In-Reply-To: <20140817083022.GJ23808@peff.net>
Am 2014-08-17 um 10:30 schrieb Jeff King:
> On Tue, Aug 12, 2014 at 06:59:17PM -0700, Jonathan Nieder wrote:
>
>>> + curl_socket_t sockfd = tunnel.out; // what about tunnel.in ?
>>
>> Hmm. curl expects to get a socket it can send(), recv(), setsockopt(),
>> etc on instead of a pair of fds to read() and write().
>
> I wonder if we could teach run_command to optionally use socketpair()
> instead of pipe().
That sounds like a good idea to me.
> I'm not sure if that would cause problems on Windows,
> though.
Apparently socketpair is not available there. Googling "socketpair
windows" yields, among a lot of other useful resources, the following
relatively actively maintained ~150 LOC, BSD-3-clause-licensed,
implementation:
https://github.com/ncm/selectable-socketpair
That license is GPL compatible, so should we consider including that
implementation with git? That's the kind of stuff that goes to
compat/win32, right?
One thing to consider: seems like socketpair() gives AF_LOCAL sockets,
so I've asked [1] on the curl ML if that would work or if libcurl needs
an AF_INET one.
>> I wonder why someone would want to use SSL through a tunnel, though.
>> Currently it's impossible to get to the SSL codepath when a tunnel is
>> active (it's in the 'else' block an 'if (srvc->tunnel)'). If that
>> property is preserved, then we should be safe.
>
> I'm not sure I understand this comment. Even if SSL is not in use,
> wouldn't we be passing a regular pipe to curl, which would break?
Yeah, we can't do that, and thus would have to keep the handwritten IMAP
implementation just for the tunnel case (allowing to drop only the
OpenSSL specific stuff), see my other email:
http://www.mail-archive.com/git@vger.kernel.org/msg56791.html (the
relevant part is pretty far down at the bottom).
Bernhard
[1] http://curl.haxx.se/mail/lib-2014-08/0131.html
next prev parent reply other threads:[~2014-08-17 12:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-12 21:50 [PATCH/RFC] git-imap-send: use libcurl for implementation Bernhard Reiter
2014-08-13 1:59 ` Jonathan Nieder
2014-08-17 8:30 ` Jeff King
2014-08-17 12:56 ` Bernhard Reiter [this message]
2014-08-17 18:42 ` Jeff King
2014-08-19 11:14 ` Bernhard Reiter
2014-08-19 17:13 ` Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2014-08-14 21:46 Bernhard Reiter
2014-08-19 17:51 ` Junio C Hamano
2014-08-25 20:11 ` Bernhard Reiter
2014-08-25 21:08 ` Junio C Hamano
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=53F0A66A.9000909@raz.or.at \
--to=ockham@raz.or.at \
--cc=434599@bugs.debian.org \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=peff@peff.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.