comparison roundup/scripts/roundup_server.py @ 4912:a0a7a6ca1586

roundup_server: Code untangle - init `rest` variable when necessary
author anatoly techtonik <techtonik@gmail.com>
date Thu, 17 Jul 2014 02:25:50 +0300
parents 0997d4d8e76c
children 8f6cfe824c9f
comparison
equal deleted inserted replaced
4911:0997d4d8e76c 4912:a0a7a6ca1586
275 w('</ol></body></html>') 275 w('</ol></body></html>')
276 276
277 def inner_run_cgi(self): 277 def inner_run_cgi(self):
278 ''' This is the inner part of the CGI handling 278 ''' This is the inner part of the CGI handling
279 ''' 279 '''
280 rest = self.path 280
281 281 # self.path is /some/path?with&all=stuff
282 if rest == '/favicon.ico': 282 if self.path == '/favicon.ico':
283 # file-like object for the favicon.ico file information 283 # file-like object for the favicon.ico file information
284 favicon_fileobj = None 284 favicon_fileobj = None
285 285
286 # check to see if a custom favicon was specified, and set 286 # check to see if a custom favicon was specified, and set
287 # favicon_fileobj to the input file 287 # favicon_fileobj to the input file
312 312
313 favicon_fileobj.close() 313 favicon_fileobj.close()
314 314
315 return 315 return
316 316
317 i = rest.rfind('?') 317 i = self.path.rfind('?')
318 if i >= 0: 318 if i >= 0:
319 rest, query = rest[:i], rest[i+1:] 319 # rest starts with /, query is without ?
320 else: 320 rest, query = self.path[:i], self.path[i+1:]
321 else:
322 rest = self.path
321 query = '' 323 query = ''
322 324
323 # no tracker - spit out the index 325 # no tracker - spit out the index
324 if rest == '/': 326 if rest == '/':
325 self.index() 327 self.index()

Roundup Issue Tracker: http://roundup-tracker.org/