git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v8 1/3] gitweb: add `status` headers to git_feed() responses.

From
W. Trevor King <wking@drexel.edu>
Date
Mar 29, 2012, 12:45 UTC
Message-ID
<4958e06536924de10105bb453d88e8f4c28bb8c1.1333024238.git.wking@drexel.edu>
In-Reply-To
<201203282328.08876.jnareb@gmail.com>

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>
---
 gitweb/gitweb.perl |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index a8b5fad..041da17 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -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
-- 
1.7.3.4
Previous: Junio C HamanoNext: Jakub Narebski
Message 13 of 18 in “gitweb: refactor If-Modified-Since handling”
  1. 0/3 gitweb: refactor If-Modified-Since handlingW. Trevor King, Mar 28, 2012
  2. 1/3 gitweb: add `status` headers to git_feed() responses.W. Trevor King, Mar 28, 2012
  3. 2/3 gitweb: refactor If-Modified-Since handlingW. Trevor King, Mar 28, 2012
  4. 3/3 gitweb: add If-Modified-Since handling to git_snapshot().W. Trevor King, Mar 28, 2012
  5. Jakub NarebskiMar 28, 2012
  6. W. Trevor KingMar 28, 2012
  7. Junio C HamanoMar 28, 2012
  8. W. Trevor KingMar 28, 2012
  9. Jakub NarebskiMar 28, 2012
  10. Jakub NarebskiMar 28, 2012
  11. 0/3 gitweb: refactor If-Modified-Since handlingW. Trevor King, Mar 29, 2012
  12. Junio C HamanoMar 30, 2012
  13. 1/3 gitweb: add `status` headers to git_feed() responses.W. Trevor King, Mar 29, 2012
  14. Jakub NarebskiMar 30, 2012
  15. 2/3 gitweb: refactor If-Modified-Since handlingW. Trevor King, Mar 29, 2012
  16. Jakub NarebskiMar 30, 2012
  17. 3/3 gitweb: add If-Modified-Since handling to git_snapshot().W. Trevor King, Mar 29, 2012
  18. Jakub NarebskiMar 30, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.