summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2012-03-29 12:45:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-03-30 16:07:26 (GMT)
commite1c3643ff78610d2e6b42c206cd5ed33a9353285 (patch)
tree1fca69bee5fc10bfd894cb4abc4714fd2ab09e15 /gitweb
parentf524129737d9ba3e685c31bacde844ec1db1fea9 (diff)
downloadgit-e1c3643ff78610d2e6b42c206cd5ed33a9353285.zip
git-e1c3643ff78610d2e6b42c206cd5ed33a9353285.tar.gz
git-e1c3643ff78610d2e6b42c206cd5ed33a9353285.tar.bz2
gitweb: add `status` headers to git_feed() responses.
The git_feed() method was not setting a `Status` header unless it was responding to an If-Modified-Since request with `304 Not Modified`. Now, when it is serving successful responses, it sets status to `200 OK`. Signed-off-by: W Trevor King <wking@drexel.edu> Acked-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl6
1 files changed, 4 insertions, 2 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index a8b5fad..041da17 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -7841,11 +7841,13 @@ sub git_feed {
print $cgi->header(
-type => $content_type,
-charset => 'utf-8',
- -last_modified => $latest_date{'rfc2822'});
+ -last_modified => $latest_date{'rfc2822'},
+ -status => '200 OK');
} else {
print $cgi->header(
-type => $content_type,
- -charset => 'utf-8');
+ -charset => 'utf-8',
+ -status => '200 OK');
}
# Optimization: skip generating the body if client asks only