~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/apps/transport.py

  • Committer: Robert Collins
  • Date: 2010-04-08 01:08:33 UTC
  • Revision ID: robertc@robertcollins.net-20100408010833-bdyut0exh4o7dk7a
Merge patch from Toshio Kuratomi to work with mod_wsgi - Content-Length must be strings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2008-2011 Canonical Ltd.
 
1
# Copyright (C) 2008, 2009 Canonical Ltd.
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
33
33
from loggerhead.apps import favicon_app, robots_app, static_app
34
34
from loggerhead.controllers.directory_ui import DirectoryUI
35
35
 
36
 
# TODO: Use bzrlib.ui.bool_from_string(), added in bzr 1.18
37
36
_bools = {
38
37
    'yes': True, 'no': False,
39
38
    'on': True, 'off': False,
69
68
    def app_for_non_branch(self, environ):
70
69
        segment = path_info_pop(environ)
71
70
        if segment is None:
72
 
            raise httpexceptions.HTTPMovedPermanently.relative_redirect(
73
 
                environ['SCRIPT_NAME'] + '/', environ)
 
71
            raise httpexceptions.HTTPMovedPermanently(
 
72
                environ['SCRIPT_NAME'] + '/')
74
73
        elif segment == '':
75
74
            if self.name:
76
75
                name = self.name