Ignore:
Timestamp:
Jun 21, 2008, 10:51:38 PM (17 years ago)
Author:
andersk
Message:

Redirect overlord -> overlord/ and use relative redirects.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-www/code/main.py

    r632 r633  
    342342        machine = validation.Validate(username, state, machine_id=fields.getfirst('machine_id')).machine
    343343        return ({'Status': '303 See Other',
    344                  'Location': '/info?machine_id=%d' % machine.machine_id},
     344                 'Location': 'info?machine_id=%d' % machine.machine_id},
    345345                "You shouldn't see this message.")
    346346    else:
     
    586586
    587587def overlord(username, state, path, fields):
     588    if path == '':
     589        return ({'Status': '303 See Other',
     590                 'Location': 'overlord/'},
     591                "You shouldn't see this message.")
    588592    if not username in getAfsGroupMembers('system:xvm', 'athena.mit.edu'):
    589593        raise InvalidInput('username', username, 'Not an overlord.')
     
    667671        operation = self.environ.get('PATH_INFO', '')
    668672        if not operation:
    669             self.start("301 Moved Permanently", [('Location',
    670                                                   self.environ['SCRIPT_NAME']+'/')])
     673            self.start("301 Moved Permanently", [('Location', './')])
    671674            return
    672675        if self.username is None:
Note: See TracChangeset for help on using the changeset viewer.