Re: [PATCH] gitweb: return correct HTTP status codes

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jakub Narebski
Date: Monday, June 16, 2008 - 3:34 pm

On Mon, 16 Jun 2008, Lea Wiemann wrote:

The "examine stderr" was a bit tongue-in-cheek, i.e. solution which
would require least changes... but I guess very impractical.


I have thought that Git.pm API together with catching (and examining)
Error, perhaps with redirecting STDERR somewhere (but it would be best
if it would not be needed) would be enough.


If the source of error is some misconfiguration on server, then 5xx is
appropriate (for example git binary is not found, something which
perhaps we should check upfront at the beginning).  But I think it
should be very, very rare, and result of misconfigured gitweb, or error
installing git... or corrupted repository.

If source of error is mistake in URL, I would certainly want 4xx error.
So the user knows that he/she has to look at the URL.

That said, perhaps I am worrying over nothing, and
  or die_error(undef, "Open <git command> failed");
can happen only on some serious server error (like corrupted
repository).


From RFC 2616 (http://tools.ietf.org/html/rfc2616)

 10.4 Client Error 4xx

   The 4xx class of status code is intended for cases in which the
   client seems to have erred.

 [...]

 10.5 Server Error 5xx

   Response status codes beginning with the digit "5" indicate cases in
   which the server is aware that it has erred or is incapable of
   performing the request.
 

It is unfortunately very simple pattern based filter, not Markovian,
spam/ham Bayesian, or even simple Bayesian.

-- 
Jakub Narebski
Poland
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] gitweb: return correct HTTP status codes, Lea Wiemann, (Sun Jun 15, 2:15 pm)
Re: [PATCH] gitweb: return correct HTTP status codes, Jakub Narebski, (Sun Jun 15, 3:48 pm)
Re: [PATCH] gitweb: return correct HTTP status codes, Lea Wiemann, (Mon Jun 16, 8:57 am)
Re: [PATCH] gitweb: return correct HTTP status codes, Jakub Narebski, (Mon Jun 16, 9:43 am)
Re: [PATCH] gitweb: return correct HTTP status codes, Lea Wiemann, (Mon Jun 16, 2:49 pm)
Re: [PATCH] gitweb: return correct HTTP status codes, Jakub Narebski, (Mon Jun 16, 3:34 pm)
Re: [PATCH] gitweb: return correct HTTP status codes, Junio C Hamano, (Mon Jun 16, 3:38 pm)
Re: [PATCH] gitweb: return correct HTTP status codes, Jakub Narebski, (Mon Jun 16, 4:37 pm)
Re: [PATCH] gitweb: return correct HTTP status codes, Lea Wiemann, (Tue Jun 17, 6:53 am)
Re: [PATCH] gitweb: return correct HTTP status codes, Lea Wiemann, (Tue Jun 17, 7:04 am)
Re: [PATCH] gitweb: return correct HTTP status codes, Jakub Narebski, (Tue Jun 17, 7:33 am)
Re: [PATCH] gitweb: return correct HTTP status codes, Lea Wiemann, (Tue Jun 17, 3:28 pm)
Re: [PATCH] gitweb: return correct HTTP status codes, Jakub Narebski, (Tue Jun 17, 3:54 pm)
Re: [PATCH] gitweb: return correct HTTP status codes, Lea Wiemann, (Tue Jun 17, 4:47 pm)
Re: [PATCH] gitweb: return correct HTTP status codes, Jakub Narebski, (Tue Jun 17, 5:12 pm)
[PATCH] gitweb: standarize HTTP status codes, Lea Wiemann, (Tue Jun 17, 5:15 pm)
Re: [PATCH] gitweb: return correct HTTP status codes, Lea Wiemann, (Tue Jun 17, 6:25 pm)
Re: [PATCH] gitweb: return correct HTTP status codes, Jakub Narebski, (Wed Jun 18, 12:35 am)
Re: [PATCH v2] gitweb: standarize HTTP status codes, Jakub Narebski, (Wed Jun 18, 5:51 pm)
Re: [PATCH v2] gitweb: standarize HTTP status codes, Lea Wiemann, (Thu Jun 19, 12:08 pm)
[PATCH v3] gitweb: standarize HTTP status codes, Lea Wiemann, (Thu Jun 19, 1:03 pm)
[PATCH v3] gitweb: standarize HTTP status codes, Lea Wiemann, (Thu Jun 19, 1:25 pm)
Re: [PATCH v2] gitweb: standarize HTTP status codes, Jakub Narebski, (Thu Jun 19, 3:22 pm)
Re: [PATCH v3] gitweb: standarize HTTP status codes, Jakub Narebski, (Thu Jun 19, 3:37 pm)
Re: [PATCH v3] gitweb: standarize HTTP status codes, Junio C Hamano, (Thu Jun 19, 5:48 pm)