Changeset - c137b8a81f8e
[Not reviewed]
beta
0 2 0
Marcin Kuzminski - 14 years ago 2012-03-12 19:33:13
marcin@python-works.com
git+hg middleware do repo verification at earliest possible state, giving 404 as fast as possible. If repo is not found.
2 files changed with 8 insertions and 8 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/middleware/simplegit.py
Show inline comments
 
@@ -115,6 +115,10 @@ class SimpleGit(BaseVCSController):
 
        except:
 
            return HTTPInternalServerError()(environ, start_response)
 

	
 
        # quick check if that dir exists...
 
        if is_valid_repo(repo_name, self.basepath) is False:
 
            return HTTPNotFound()(environ, start_response)
 

	
 
        #======================================================================
 
        # GET ACTION PULL or PUSH
 
        #======================================================================
 
@@ -181,10 +185,6 @@ class SimpleGit(BaseVCSController):
 
        repo_path = os.path.join(safe_str(self.basepath), safe_str(repo_name))
 
        log.debug('Repository path is %s' % repo_path)
 

	
 
        # quick check if that dir exists...
 
        if is_valid_repo(repo_name, self.basepath) is False:
 
            return HTTPNotFound()(environ, start_response)
 

	
 
        try:
 
            #invalidate cache on push
 
            if action == 'push':
rhodecode/lib/middleware/simplehg.py
Show inline comments
 
@@ -85,6 +85,10 @@ class SimpleHg(BaseVCSController):
 
        except:
 
            return HTTPInternalServerError()(environ, start_response)
 

	
 
        # quick check if that dir exists...
 
        if is_valid_repo(repo_name, self.basepath) is False:
 
            return HTTPNotFound()(environ, start_response)
 

	
 
        #======================================================================
 
        # GET ACTION PULL or PUSH
 
        #======================================================================
 
@@ -163,10 +167,6 @@ class SimpleHg(BaseVCSController):
 
        baseui = make_ui('db')
 
        self.__inject_extras(repo_path, baseui, extras)
 

	
 
        # quick check if that dir exists...
 
        if is_valid_repo(repo_name, self.basepath) is False:
 
            return HTTPNotFound()(environ, start_response)
 

	
 
        try:
 
            # invalidate cache on push
 
            if action == 'push':
0 comments (0 inline, 0 general)