]> Lady’s Gitweb - Gitweb/commit
gitweb: standarize HTTP status codes
authorLea Wiemann <redacted>
Thu, 19 Jun 2008 20:03:21 +0000 (22:03 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:33 +0000 (00:07 -0400)
commit234b49e50c48baef61b328ac2356b877c9b8a912c1e59948b092deae81cddca0
tree0864c191fc5b72d90258553afb79ff64a52a2d1c499f8d745bd2ac9ed6e343ee
parenteb450136653d4b71b6cdba2b497b5855dc30f3bef33cbd21ac86b065079f697c
gitweb: standarize HTTP status codes

Many error status codes simply default to 403 Forbidden, which is not
correct in most cases.  This patch makes gitweb return semantically
correct status codes.

For convenience the die_error function now only takes the status code
without reason as first parameter (e.g. 404 instead of "404 Not
Found"), and it now defaults to 500 (Internal Server Error), even
though the default is not used anywhere.

Also documented status code conventions in die_error.

Signed-off-by: Lea Wiemann <redacted>
Acked-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl
This page took 0.254042 seconds and 4 git commands to generate.