Skip to content

Commit

Permalink
gitweb: add status headers to git_feed() responses.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
W. Trevor King authored and Junio C Hamano committed Mar 30, 2012
1 parent f524129 commit e1c3643
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e1c3643

Please sign in to comment.