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>
W. Trevor King committed
Mar 29, 2012 at 08:45 UTC
e1c3643ff78610d2e6b42c206cd5ed33a9353285
1 file changed
+4
-2
gitweb/gitweb.perl
+4
-2
@@ -7841,11 +7841,13 @@ sub git_feed {
7841
print $cgi->header(
7842
-type => $content_type,
7843
-charset => 'utf-8',
7844
- -last_modified => $latest_date{'rfc2822'});
7844
+ -last_modified => $latest_date{'rfc2822'},
7845
+ -status => '200 OK');
7846
} else {
7847
print $cgi->header(
7848
-type => $content_type,
7848
- -charset => 'utf-8');
7849
+ -charset => 'utf-8',
7850
+ -status => '200 OK');
7851
}
7852
7853
# Optimization: skip generating the body if client asks only