def _split_digest_auth(data):
 values = []
 curdata = []
 state = 0
 for char in data:
  if (state == 0):
   if (char == ','):
    values.append(''.join(curdata).strip())
    curdata = []
   else:
    if (char == '"'):
     state = 1
    curdata.append(char)
  elif (state == 1):
   if (char == '"'):
    state = 0
   curdata.append(char)
 values.append(''.join(curdata).strip())
 if ((state == 1) and config.DEBUG):
  sys.stderr.write(('IVRE: WARNING: could not parse Digest auth data [%r]' % data))
 return values

def _split_digest_auth ( data ) : values = [ ] curdata = [ ] state = 0 for char in data : if ( state == 0 ) : if ( char == ',' ) : values . append ( '' . join ( curdata ) . strip ( ) ) curdata = [ ] else : if ( char == '"' ) : state = 1 curdata . append ( char ) elif ( state == 1 ) : if ( char == '"' ) : state = 0 curdata . append ( char ) values . append ( '' . join ( curdata ) . strip ( ) ) if ( ( state == 1 ) and config . DEBUG ) : sys . stderr . write ( ( 'IVRE: WARNING: could not parse Digest auth data [%r]' % data ) ) return values
this function handles authorization: digest values .