From: Jeff King <peff@peff.net>
To: 乙酸鋰 <ch3cooli@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git smart-http do not authent to allow git ls-remote to be called anonymously
Date: Wed, 31 Oct 2012 07:53:46 -0400 [thread overview]
Message-ID: <20121031115346.GC30879@sigill.intra.peff.net> (raw)
In-Reply-To: <CAHtLG6SsMgwquaD_Rd0YvR9Ues-u1ktEdOXC2MAfEM9Naac=5g@mail.gmail.com>
[+cc git@vger; please keep discussion on the list]
On Sun, Oct 28, 2012 at 01:26:51PM +0800, 乙酸鋰 wrote:
> > POST /git/Cat1/SubCat1/xsp.git/git-upload-pack HTTP/1.1
> User-Agent: git/1.8.0
> Host: localhost
> Accept-Encoding: gzip
> Content-Type: application/x-git-upload-pack-request
> Accept: application/x-git-upload-pack-result
> Content-Length: 190
>
> * The requested URL returned error: 401
> * Closing connection #0
> Username for 'http://localhost': user
> Password for 'http://user@localhost':
> fatal: The remote end hung up unexpectedly
OK, I see what is going on. The code in b81401c to retry POST requests
does not handle gzipped contents, and upload-pack tends to gzip what it
sends.
Your apache configuration is not really something that we ever intended
to support, and I am a little dubious of the security tradeoff being
made. But it is actually pretty easy for us to support, and it
eliminates a special case from the code, so I am tempted to do so.
The following patch series (on top of the current master, as they
require some cleanup that did not make it into 1.8.0) seems to fix it
for me.
[1/2]: remote-curl: hoist gzip buffer size to top of post_rpc
[2/2]: remote-curl: retry failed requests for auth even with gzip
-Peff
next prev parent reply other threads:[~2012-10-31 11:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-30 14:35 git smart-http do not authent to allow git ls-remote to be called anonymously 乙酸鋰
2012-10-01 0:53 ` Shawn Pearce
2012-10-01 1:09 ` Jeff King
[not found] ` <CAHtLG6QFu1rOfUeWREwVG540WvXtM1SnH6aHEJ9dKLzwNxbkVg@mail.gmail.com>
[not found] ` <CAHtLG6T=hFsSy=ScRK2cYBoUcmAG_tsg12FiFMTvzpHGmPTzfg@mail.gmail.com>
2012-10-14 6:30 ` Jeff King
[not found] ` <CAHtLG6QR4CtC3RkVE3FQXhrZPJem6SZbrJFyn9K_4yHzhzYt1Q@mail.gmail.com>
[not found] ` <20121026134907.GK1455@sigill.intra.peff.net>
[not found] ` <CAHtLG6SsMgwquaD_Rd0YvR9Ues-u1ktEdOXC2MAfEM9Naac=5g@mail.gmail.com>
2012-10-31 11:53 ` Jeff King [this message]
2012-10-31 11:55 ` [PATCH 1/2] remote-curl: hoist gzip buffer size to top of post_rpc Jeff King
2012-10-31 12:01 ` [PATCH 2/2] remote-curl: retry failed requests for auth even with gzip Jeff King
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=20121031115346.GC30879@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=ch3cooli@gmail.com \
--cc=git@vger.kernel.org \
/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).