~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/apps/transport.py

Fix serving branches over HTTP (bug #380026)

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
        elif environ['PATH_INFO'] == '/favicon.ico':
83
83
            return favicon_app(environ, start_response)
84
84
        elif '/.bzr/' in environ['PATH_INFO']:
85
 
            app = urlparser.make_static(None, self.transport)
86
 
            return app(environ, start_response)
 
85
            # TODO: Use something here that uses the transport API 
 
86
            # rather than relying on the local filesystem API.
 
87
            try:
 
88
                path = urlutils.local_path_from_url(self.transport.base)
 
89
            except errors.InvalidURL:
 
90
                raise httpexceptions.HTTPNotFound()
 
91
            else:
 
92
                app = urlparser.make_static(None, path)
 
93
                return app(environ, start_response)
87
94
        else:
88
95
            return BranchesFromTransportServer(
89
96
                self.transport, self)(environ, start_response)