X-Git-Url: https://git.ladys.computer/Gitweb/blobdiff_plain/7f15815175d5452aae9d7e5d2166c2e8371894a9552061be24add4c8c79743ac..fcb1894e5130367905abab7cc81c5605bce1f3ed1923af68665a8aec1a821c6b:/gitweb.perl
diff --git a/gitweb.perl b/gitweb.perl
index a1b1c36..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,24 @@ 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
+ my $img = esc_url($logo || $favicon);
+ print "\n" .
+ "$img\n" .
+ "$title\n" .
+ "$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 <
@@ -6102,6 +6142,7 @@ XML
} else {
print "$latest_date{'iso-8601'}\n";
}
+ print "gitweb\n";
}
# contents