def my_request_classifier(environ):
 request_method = REQUEST_METHOD(environ)
 if (request_method in _DAV_METHODS):
  return 'dav'
 useragent = USER_AGENT(environ)
 if useragent:
  for agent in _DAV_USERAGENTS:
   if (useragent.find(agent) != (-1)):
    return 'dav'
 if (request_method == 'POST'):
  if (CONTENT_TYPE(environ) == 'text/xml'):
   return 'xmlpost'
  elif (CONTENT_TYPE(environ) == 'application/soap+xml'):
   return 'soap'
 return 'browser'

def my_request_classifier ( environ ) : request_method = REQUEST_METHOD ( environ ) if ( request_method in _DAV_METHODS ) : return 'dav' useragent = USER_AGENT ( environ ) if useragent : for agent in _DAV_USERAGENTS : if ( useragent . find ( agent ) != ( - 1 ) ) : return 'dav' if ( request_method == 'POST' ) : if ( CONTENT_TYPE ( environ ) == 'text/xml' ) : return 'xmlpost' elif ( CONTENT_TYPE ( environ ) == 'application/soap+xml' ) : return 'soap' return 'browser'
returns one of the classifiers dav .