From: Junio C Hamano <junkio@cox.net>
To: Nick Hengeveld <nickh@reactrix.com>
Cc: git@vger.kernel.org
Subject: Re: Cloning from sites with 404 overridden
Date: Wed, 22 Mar 2006 11:05:50 -0800 [thread overview]
Message-ID: <7vslpa8fld.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <20060322183621.GP3997@reactrix.com> (Nick Hengeveld's message of "Wed, 22 Mar 2006 10:36:21 -0800")
Nick Hengeveld <nickh@reactrix.com> writes:
> Some HTTP server environments return a 200 status and text/html error
> document or a redirect to one rather than a 404 status if a loose
> object does not exist. This patch detects and reports this condition
> to differentiate between a misconfigured server and an actual corrupt
> object on the server.
> 61069cc348640fef2b8c503b8b8f00f689872cab
> diff --git a/http-fetch.c b/http-fetch.c
> index dc67218..ee5b585 100644
> --- a/http-fetch.c
> +++ b/http-fetch.c
> @@ -41,6 +41,7 @@ struct object_request
> CURLcode curl_result;
>...
> + char *content_type;
> unsigned char real_sha1[20];
>...
You probably need only one bit here,...
> @@ -258,9 +259,15 @@ static void finish_object_request(struct
>
> static void process_object_response(void *callback_data)
>...
> + curl_easy_getinfo(obj_req->slot->curl, CURLINFO_CONTENT_TYPE,
> + &content_type);
> + if (content_type)
> + obj_req->content_type = strdup(content_type);
> +
... and note if that is an HTML document or not.
We do bend backwards to support ISP HTTP servers, but this might
be going a bit too far. Also I wonder if ISP runs a really
dumb-friendly configured server that defaults to text/html
unless the mimemap says otherwise. Loose object files do not
have suffixes and I am expecting these servers would give
whatever the server default is.
next prev parent reply other threads:[~2006-03-22 19:06 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-22 2:59 Cloning from sites with 404 overridden linux
2006-03-22 3:12 ` Shawn Pearce
2006-03-22 4:13 ` Linus Torvalds
2006-03-22 6:06 ` Marco Costalba
2006-03-22 6:47 ` Junio C Hamano
2006-03-22 13:36 ` Andreas Ericsson
2006-03-24 17:29 ` Mark Wooding
2006-03-24 17:52 ` Junio C Hamano
2006-03-24 17:53 ` Linus Torvalds
2006-03-24 18:16 ` Morten Welinder
2006-03-24 18:40 ` Andreas Ericsson
2006-03-22 17:22 ` Nick Hengeveld
2006-03-22 18:36 ` Nick Hengeveld
2006-03-22 19:05 ` Junio C Hamano [this message]
2006-03-22 19:22 ` Junio C Hamano
2006-03-23 18:43 ` Nick Hengeveld
2006-03-23 20:45 ` Junio C Hamano
2006-03-22 21:24 ` Radoslaw Szkodzinski
-- strict thread matches above, loose matches on Subject: below --
2006-03-19 10:52 Marco Costalba
2006-03-19 13:25 ` Paolo Ciarrocchi
2006-03-19 14:04 ` Marco Costalba
2006-03-19 19:37 ` Junio C Hamano
2006-03-19 21:40 ` Marco Costalba
2006-03-19 23:21 ` Junio C Hamano
2006-03-20 6:31 ` Marco Costalba
2006-03-20 8:44 ` Junio C Hamano
2006-03-20 12:17 ` Marco Costalba
2006-03-20 18:29 ` Lukas Sandström
2006-03-20 19:43 ` Petr Baudis
2006-03-20 19:54 ` Nick Hengeveld
2006-03-19 19:47 ` Junio C Hamano
2006-03-19 21:31 ` Petr Baudis
2006-03-19 21:43 ` Petr Baudis
2006-03-19 21:45 ` Marco Costalba
2006-03-20 4:32 ` Randal L. Schwartz
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=7vslpa8fld.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=nickh@reactrix.com \
/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