All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Hengeveld <nickh@reactrix.com>
To: Daniel Drake <dsd@gentoo.org>
Cc: Junio C Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: HTTP repo referencing stale heads (can't clone)
Date: Tue, 4 Apr 2006 11:01:30 -0700	[thread overview]
Message-ID: <20060404180130.GF14967@reactrix.com> (raw)
In-Reply-To: <4431694C.4000007@gentoo.org>

On Mon, Apr 03, 2006 at 07:28:28PM +0100, Daniel Drake wrote:

> Ah, should have known. I am behind a (lame) transparent proxy on port 80.
> 
> I opened that file in my web browser and it showed the old heads. After 
> a force-refresh (ctrl+F5, which sends some additionally http headers to 
> refresh the page from the real server), the old heads disappeared, and 
> git now clones successfully.
> 
> git-http-fetch should probably send those extra headers too. I'll try to 
> find some time to look at this next week.

git-http-fetch uses the "Pragma: no-cache" header when requesting
objects that shouldn't be cached.  Is this the additional header you're
referring to?

This patch adds the header to git-ls-remote for the info/refs request.


git-ls-remote: send no-cache header when fetching info/refs

Proxies should not cache this file as it can cause a client to end up with
a stale version, as reported here:

http://marc.theaimsgroup.com/?l=git&m=114407944125389

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>


---

 git-ls-remote.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

da9b6fa01f1a8bd6ab5f6d4346584f3f032584aa
diff --git a/git-ls-remote.sh b/git-ls-remote.sh
index 2c9a588..b6882a9 100755
--- a/git-ls-remote.sh
+++ b/git-ls-remote.sh
@@ -53,7 +53,7 @@ http://* | https://* )
         if [ -n "$GIT_SSL_NO_VERIFY" ]; then
             curl_extra_args="-k"
         fi
-	curl -nsf $curl_extra_args "$peek_repo/info/refs" ||
+	curl -nsf $curl_extra_args --header "Pragma: no-cache" "$peek_repo/info/refs" ||
 		echo "failed	slurping"
 	;;
 
-- 
1.3.0.rc1.g9aef-dirty

  reply	other threads:[~2006-04-04 18:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-03 16:01 HTTP repo referencing stale heads (can't clone) Daniel Drake
2006-04-03 17:23 ` Junio C Hamano
2006-04-03 18:09   ` Nick Hengeveld
2006-04-04  7:03     ` Junio C Hamano
2006-04-04 10:00     ` Petr Baudis
2006-04-04 12:10       ` Nick Hengeveld
2006-04-04 15:27         ` Petr Baudis
2006-04-04 17:56           ` Nick Hengeveld
2006-04-03 18:28   ` Daniel Drake
2006-04-04 18:01     ` Nick Hengeveld [this message]
2006-04-05 12:23       ` Radoslaw Szkodzinski

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=20060404180130.GF14967@reactrix.com \
    --to=nickh@reactrix.com \
    --cc=dsd@gentoo.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.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.