X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/e653808b9d049144c2805855b92ebe85daf3fc7c89aa8ae8534c4ffdbdac4d52..ce7f4e754228707e32e07e75722cdb2dadba5cdeb4656d3d49051bb207149f36:/gitweb.perl
diff --git a/gitweb.perl b/gitweb.perl
index 78f54e7..a0b1681 100755
--- a/gitweb.perl
+++ b/gitweb.perl
@@ -2902,6 +2902,11 @@ sub git_header_html {
$title
EOF
+# the stylesheet, favicon etc urls won't work correctly with path_info unless we
+# set the appropriate base URL
+ if ($ENV{'PATH_INFO'}) {
+ print '\n';
+ }
# print out each stylesheet that exist
if (defined $stylesheet) {
#provides backwards capability for those people who define style sheet in a config file
@@ -6016,7 +6021,25 @@ sub git_feed {
}
if (defined($commitlist[0])) {
%latest_commit = %{$commitlist[0]};
- %latest_date = parse_date($latest_commit{'author_epoch'});
+ my $latest_epoch = $latest_commit{'committer_epoch'};
+ %latest_date = parse_date($latest_epoch);
+ my $if_modified = $cgi->http('IF_MODIFIED_SINCE');
+ if (defined $if_modified) {
+ my $since;
+ if (eval { require HTTP::Date; 1; }) {
+ $since = HTTP::Date::str2time($if_modified);
+ } elsif (eval { require Time::ParseDate; 1; }) {
+ $since = Time::ParseDate::parsedate($if_modified, GMT => 1);
+ }
+ if (defined $since && $latest_epoch <= $since) {
+ print $cgi->header(
+ -type => $content_type,
+ -charset => 'utf-8',
+ -last_modified => $latest_date{'rfc2822'},
+ -status => '304 Not Modified');
+ return;
+ }
+ }
print $cgi->header(
-type => $content_type,
-charset => 'utf-8',
@@ -6075,7 +6098,9 @@ XML
print "$title\n" .
"$alt_url\n" .
"$descr\n" .
- "en\n";
+ "en\n" .
+ # project owner is responsible for 'editorial' content
+ "$owner\n";
if (defined $logo || defined $favicon) {
# prefer the logo to the favicon, since RSS
# doesn't allow both
@@ -6086,6 +6111,11 @@ XML
"$alt_url\n" .
"\n";
}
+ if (%latest_date) {
+ print "$latest_date{'rfc2822'}\n";
+ print "$latest_date{'rfc2822'}\n";
+ }
+ print "gitweb v.$version/$git_version\n";
} elsif ($format eq 'atom') {
print <
@@ -6112,6 +6142,7 @@ XML
} else {
print "$latest_date{'iso-8601'}\n";
}
+ print "gitweb\n";
}
# contents