{"thread":{"id":"18059","subject":"counting the number of connections?","startedAt":"2009-02-28T06:44:31Z","lastAt":"2009-03-05T17:00:18Z","messageCount":3,"participants":["Tay Ray Chuan","David Kågedal","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"106514","messageId":"be6fef0d0902272244q468b1fa4sacdc15afa9a65f15@mail.gmail.com","threadId":"18059","inReplyTo":null,"subject":"counting the number of connections?","fromName":"Tay Ray Chuan","fromEmail":"rctay89@gmail.com","sentAt":"2009-02-28T06:44:31Z","receivedAt":"2009-02-28T06:44:31Z","isPatch":false,"sender":{"key":"rctay89@gmail.com","avatar":"https://avatars.githubusercontent.com/u/61553?v=4"},"body":"Hi,\n\nsome time ago I noticed curl doesn't remember your credentials (apart\nfrom those it can get from ~/.netrc), and very recently there was an\nthread on repeated prompting for credentials while pushing to https.\n\nI've written a simple patch series, which allows git to play nice\nwithout curl_multi. That is, git uses a single persistent connection\nthroughout.\n\nHowever, I'm at a loss at how to test for this. How does one count the\nnumber of connections made during the lifespan of a program's\nexecution? So far, I've been relying on my firewall log (Comodo on\nwindows). Perhaps there a more operating system/software-agnostic\nmethod to do this?\n\n-- \nCheers,\nRay Chuan\n"},{"id":"107076","messageId":"87ab80j649.fsf@krank.kagedal.org","threadId":"18059","inReplyTo":"be6fef0d0902272244q468b1fa4sacdc15afa9a65f15@mail.gmail.com","subject":"Re: counting the number of connections?","fromName":"David Kågedal","fromEmail":"davidk@lysator.liu.se","sentAt":"2009-03-05T16:18:14Z","receivedAt":"2009-03-05T16:18:14Z","isPatch":false,"sender":{"key":"davidk@lysator.liu.se","avatar":"https://avatars.githubusercontent.com/u/60530?v=4"},"body":"Tay Ray Chuan <rctay89@gmail.com> writes:\n\n> Hi,\n>\n> some time ago I noticed curl doesn't remember your credentials (apart\n> from those it can get from ~/.netrc), and very recently there was an\n> thread on repeated prompting for credentials while pushing to https.\n>\n> I've written a simple patch series, which allows git to play nice\n> without curl_multi. That is, git uses a single persistent connection\n> throughout.\n>\n> However, I'm at a loss at how to test for this. How does one count the\n> number of connections made during the lifespan of a program's\n> execution? So far, I've been relying on my firewall log (Comodo on\n> windows). Perhaps there a more operating system/software-agnostic\n> method to do this?\n\nYou could set up a single-use tcp forwarder which will make any second\nconnection fail. Using socat, for instance:\n\n  $ socat tcp-listen:2222,bind=localhost tcp:my.server:22 &\n  $ nc localhost 2222\n  SSH-2.0-OpenSSH_5.1p1 Debian-3ubuntu1\n  ^C\n  $ nc localhost 2222\n  localhost [127.0.0.1] 2222 (?) : Connection refused\n\n-- \nDavid Kågedal\n"},{"id":"107082","messageId":"alpine.DEB.1.00.0903051758440.6524@intel-tinevez-2-302","threadId":"18059","inReplyTo":"87ab80j649.fsf@krank.kagedal.org","subject":"Re: counting the number of connections?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-03-05T17:00:18Z","receivedAt":"2009-03-05T17:00:18Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 5 Mar 2009, David Kågedal wrote:\n\n> Tay Ray Chuan <rctay89@gmail.com> writes:\n> \n> > some time ago I noticed curl doesn't remember your credentials (apart \n> > from those it can get from ~/.netrc), and very recently there was an \n> > thread on repeated prompting for credentials while pushing to https.\n> >\n> > I've written a simple patch series, which allows git to play nice\n> > without curl_multi. That is, git uses a single persistent connection\n> > throughout.\n> >\n> > However, I'm at a loss at how to test for this. How does one count the\n> > number of connections made during the lifespan of a program's\n> > execution? So far, I've been relying on my firewall log (Comodo on\n> > windows). Perhaps there a more operating system/software-agnostic\n> > method to do this?\n> \n> You could set up a single-use tcp forwarder which will make any second\n> connection fail. Using socat, for instance:\n> \n>   $ socat tcp-listen:2222,bind=localhost tcp:my.server:22 &\n>   $ nc localhost 2222\n>   SSH-2.0-OpenSSH_5.1p1 Debian-3ubuntu1\n>   ^C\n>   $ nc localhost 2222\n>   localhost [127.0.0.1] 2222 (?) : Connection refused\n\nAFAICT Ray wants to provide tests for Git's test suite, and introducing \nsocat as a dependency for our tests does not really fly all that well.\n\nBut IIRC somebody convinced Ray that it is better to require a new-enough \ncURL version so that the patch becomes moot itself.\n\nCiao,\nDscho\n"}]}