svn: extend detection of SVN to PROPFIND/PROPATCH methods.
- in some cases like usage of tortoisesvn non of the available SVN protocol detection methods are available - with extended method we're able to catch directory delete/create
This commit is contained in:
parent
245d213bf2
commit
539e88e6c6
1 changed files with 4 additions and 1 deletions
|
|
@ -76,12 +76,15 @@ def is_svn(environ):
|
|||
"""
|
||||
Returns True if requests target is Subversion server
|
||||
"""
|
||||
|
||||
http_dav = environ.get('HTTP_DAV', '')
|
||||
magic_path_segment = rhodecode.CONFIG.get(
|
||||
'rhodecode_subversion_magic_path', '/!svn')
|
||||
is_svn_path = (
|
||||
'subversion' in http_dav or
|
||||
magic_path_segment in environ['PATH_INFO'])
|
||||
magic_path_segment in environ['PATH_INFO']
|
||||
or environ['REQUEST_METHOD'] in ['PROPFIND', 'PROPPATCH']
|
||||
)
|
||||
log.debug(
|
||||
'request path: `%s` detected as SVN PROTOCOL %s', environ['PATH_INFO'],
|
||||
is_svn_path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue