Skip to content

Commit e1c3643

Browse files
W. Trevor Kinggitster
authored andcommitted
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 <[email protected]> Acked-by: Jakub Narebski <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f524129 commit e1c3643

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

gitweb/gitweb.perl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7841,11 +7841,13 @@ sub git_feed {
78417841
print $cgi->header(
78427842
-type => $content_type,
78437843
-charset => 'utf-8',
7844-
-last_modified => $latest_date{'rfc2822'});
7844+
-last_modified => $latest_date{'rfc2822'},
7845+
-status => '200 OK');
78457846
} else {
78467847
print $cgi->header(
78477848
-type => $content_type,
7848-
-charset => 'utf-8');
7849+
-charset => 'utf-8',
7850+
-status => '200 OK');
78497851
}
78507852

78517853
# Optimization: skip generating the body if client asks only

0 commit comments

Comments
 (0)