##// END OF EJS Templates
http: improved log for ssl required
marcink -
r2593:b3b99584 default
parent child Browse files
Show More
@@ -359,8 +359,9 b' class SimpleVCS(object):'
359 # check if we have SSL required ! if not it's a bad request !
359 # check if we have SSL required ! if not it's a bad request !
360 require_ssl = str2bool(self.repo_vcs_config.get('web', 'push_ssl'))
360 require_ssl = str2bool(self.repo_vcs_config.get('web', 'push_ssl'))
361 if require_ssl and org_proto == 'http':
361 if require_ssl and org_proto == 'http':
362 log.debug('proto is %s and SSL is required BAD REQUEST !',
362 log.debug(
363 org_proto)
363 'Bad request: detected protocol is `%s` and '
364 'SSL/HTTPS is required.', org_proto)
364 return False
365 return False
365 return True
366 return True
366
367
@@ -420,7 +421,8 b' class SimpleVCS(object):'
420 # Check if the shadow repo actually exists, in case someone refers
421 # Check if the shadow repo actually exists, in case someone refers
421 # to it, and it has been deleted because of successful merge.
422 # to it, and it has been deleted because of successful merge.
422 if self.is_shadow_repo and not self.is_shadow_repo_dir:
423 if self.is_shadow_repo and not self.is_shadow_repo_dir:
423 log.debug('Shadow repo detected, and shadow repo dir `%s` is missing',
424 log.debug(
425 'Shadow repo detected, and shadow repo dir `%s` is missing',
424 self.is_shadow_repo_dir)
426 self.is_shadow_repo_dir)
425 return HTTPNotFound()(environ, start_response)
427 return HTTPNotFound()(environ, start_response)
426
428
@@ -436,7 +438,8 b' class SimpleVCS(object):'
436 anonymous_perm = self._check_permission(
438 anonymous_perm = self._check_permission(
437 action, anonymous_user, self.acl_repo_name, ip_addr,
439 action, anonymous_user, self.acl_repo_name, ip_addr,
438 plugin_id='anonymous_access',
440 plugin_id='anonymous_access',
439 plugin_cache_active=plugin_cache_active, cache_ttl=cache_ttl,
441 plugin_cache_active=plugin_cache_active,
442 cache_ttl=cache_ttl,
440 )
443 )
441 else:
444 else:
442 anonymous_perm = False
445 anonymous_perm = False
General Comments 0
You need to be logged in to leave comments. Login now