gitweb: add `status` headers to git_feed() responses.
authorW. Trevor King <wking@drexel.edu>
Thu, 29 Mar 2012 12:45:47 +0000 (08:45 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 30 Mar 2012 16:07:26 +0000 (09:07 -0700)
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>
gitweb/gitweb.perl

index a8b5fad26631207fcc17a6339ba735877c0902bd..041da17a39d5904f018f5255f9101a816c08414c 100755 (executable)
@@ -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