]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: add `status` headers to git_feed() responses.
authorW. Trevor King <redacted>
Thu, 29 Mar 2012 12:45:47 +0000 (08:45 -0400)
committerLady <redacted>
Mon, 6 Apr 2026 04:51:32 +0000 (00:51 -0400)
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 <redacted>
Acked-by: Jakub Narebski <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index ae9d115dedfa7963b44fb11517020b667f764435e0a320348b3058381d82eeb9..2d03fd76a27b8b7489f219d3672d3faa445be382e337a5bec91d050454831803 100755 (executable)
@@ -7842,11 +7842,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
This page took 0.279628 seconds and 4 git commands to generate.