parameters: (func)
return_statement: return _CheckAndLog
docstring: Decorates func, logging when 'url' params do not start with https://.
docstring_summary: Decorates func, logging when 'url' params do not start with https://.
docstring_tokens: Decorates func logging when url params do not start with https : // .
function: def _HttpUrlLoggingWrapper(func):
    """Decorates func, logging when 'url' params do not start with https://."""
    @functools.wraps(func)
    def _CheckAndLog(*args, **kwargs):
      try:
        arg_index = FindArgumentIndex(func, 'url')
      except ValueError:
        return func(*args, **kwargs)
  
      if arg_index < len(args):
        arg_value = args[arg_index]
      elif 'url' in kwargs:
        arg_value = kwargs['url']
      elif 'url' not in kwargs:
        arg_value = GetDefaultArgument(func, 'url')
  
      if arg_value and not arg_value.startswith('https://'):
        logging.warn('SECURITY : fetching non-HTTPS url %s' % (arg_value))
      return func(*args, **kwargs)
    return _CheckAndLog
function_tokens: def _HttpUrlLoggingWrapper ( func ) : @ functools . wraps ( func ) def _CheckAndLog ( * args , * * kwargs ) : try : arg_index = FindArgumentIndex ( func , 'url' ) except ValueError : return func ( * args , * * kwargs ) if arg_index < len ( args ) : arg_value = args [ arg_index ] elif 'url' in kwargs : arg_value = kwargs [ 'url' ] elif 'url' not in kwargs : arg_value = GetDefaultArgument ( func , 'url' ) if arg_value and not arg_value . startswith ( 'https://' ) : logging . warn ( 'SECURITY : fetching non-HTTPS url %s' % ( arg_value ) ) return func ( * args , * * kwargs ) return _CheckAndLog