You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2016/09/29 23:31:24 UTC
[whimsy] branch master updated: ensure trailing slash is present
This is an automated email from the ASF dual-hosted git repository.
rubys pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new d01c42b ensure trailing slash is present
d01c42b is described below
commit d01c42b68e2520194d6647c39c2f9da00e7f633a
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Thu Sep 29 19:31:09 2016 -0400
ensure trailing slash is present
---
www/secmail/server.rb | 3 +++
1 file changed, 3 insertions(+)
diff --git a/www/secmail/server.rb b/www/secmail/server.rb
index 216376d..f281e6c 100644
--- a/www/secmail/server.rb
+++ b/www/secmail/server.rb
@@ -23,12 +23,15 @@ ASF::Mail.configure
# list of messages
get '/' do
+ redirect to('/') if env['REQUEST_URI'] == env['SCRIPT_NAME']
+
# determine latest month for which there are messages
archives = Dir["#{ARCHIVE}/*.yml"].select {|name| name =~ %r{/\d{6}\.yml$}}
@mbox = archives.empty? ? nil : File.basename(archives.sort.last, '.yml')
@messages = Mailbox.new(@mbox).client_headers.select do |message|
message[:status] != :deleted
end
+
@cssmtime = File.mtime('public/secmail.css').to_i
_html :index
end
--
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].