Re: [PATCH v2] gitweb: standarize HTTP status codes

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Lea Wiemann
Date: Thursday, June 19, 2008 - 12:08 pm

Jakub Narebski wrote:

The developer's convenience of course.  It's plain redundant.


I think we're really arguing about the color of the bikeshed here.  IMO 
we're not stretching RFC 2616 too much by putting "Error" there (since 
reason codes don't matter on a technical level), and the status codes 
make enough sense to me (and I'm not even a web developer) that I'm not 
concerned about readability.

I don't think your constants a la HTTP_INVALID are a good idea (I 
remember the status codes in a year, but maybe not the constants); 
die_error could figure out the right reason code using a hash.  Either 
way will be fine with me though.

Look, I really don't care about this and I think it's plain irrelevant 
-- do you mind fixing the patch with whatever solution you prefer and 
resend it?  I'd rather spend my time on getting caching implemented, but 
if you insist on me changing this myself, please let me know.


*shrugs*  I'd rather not duplicate, and it's in the code anyway.


No, because (a) we'd have add code to check this (so it should be in a 
separate patch), and (b) I don't think we even want to return 403, since 
(as you say) it would reveal the existence of a project on the server. 
Project names can contain sensitive/confidential information though.


I used 403 in the sense of "sorry, we don't have shorter search strings 
activated for performance reasons".  The '2' could even become 
configurable.  400 is fine too, though, I don't care.


Right, thanks for pointing this out.


Separate change: I don't think this has to be a separate patch. ;-)
"Blame view not allowed": Fine with me.
Security concerns: I don't see any, and anyway you can probably infer 
from getting 403 on a=blame that it's disabled.


Yup, right.


I haven't verified that, so until we have better error handling I prefer 
500, but I really won't bother objecting to 404.  (Same goes for all 
other occurrences of 500 you quoted, which I've snipped.)  FWIW I'm 
assuming that once gitweb uses the new API, that error handling code 
will go away anyway.


I don't think that'll be a practical concern. ;-)


It's about missing CGI parameters, so 400 should be fine.


Your sentence doesn't quite parse -- why is 404 wrong?


Either way is fine.


Looking at the preceding code (the if statement) I believe diffinfo 
being false doesn't indicate 404 but actually a missing CGI parameter 
(as the error message states).


Nope, we didn't get *anything* back, so something weird happened.  500.

-- Lea
--
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)