File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ are given with the most recent entry first.
6565 file serving
6666- added Node.get() method
6767- open static files using binary mode (sf bug 693208)
68+ - fixed deja-vu bug 692910
6869
6970
70712003-??-?? 0.5.6
Original file line number Diff line number Diff line change 1616#
1717""" HTTP Server that serves roundup.
1818
19- $Id: roundup_server.py,v 1.19 2003-02-26 04:51:41 richard Exp $
19+ $Id: roundup_server.py,v 1.20 2003-02-26 05:05:56 richard Exp $
2020"""
2121
2222# python version check
@@ -123,11 +123,25 @@ def inner_run_cgi(self):
123123 else :
124124 query = ''
125125
126- # figure the tracker
126+ # no tracker - spit out the index
127127 if rest == '/' :
128128 return self .index ()
129+
130+ # figure the tracker
129131 l_path = rest .split ('/' )
130132 tracker_name = urllib .unquote (l_path [1 ])
133+
134+ # handle missing trailing '/'
135+ if len (l_path ) == 2 :
136+ self .send_response (301 )
137+ # redirect - XXX https??
138+ protocol = 'http'
139+ url = '%s://%s%s/' % (protocol , self .headers ['host' ], self .path )
140+ self .send_header ('Location' , url )
141+ self .end_headers ()
142+ self .wfile .write ('Moved Permanently' )
143+ return
144+
131145 if self .TRACKER_HOMES .has_key (tracker_name ):
132146 tracker_home = self .TRACKER_HOMES [tracker_name ]
133147 tracker = roundup .instance .open (tracker_home )
You can’t perform that action at this time.
0 commit comments