#NEWLINE# def get_http_connect( account_func , container_func , object_func ) : #NEWLINE# #INDENT# 'Returns a http_connect function that delegates to\n    entity-specific http_connect methods based on request path.\n    ' #NEWLINE# def http_connect( ipaddr , port , device , partition , method , path , headers = None , query_string = None ) : #NEWLINE# #INDENT# ( a , c , o ) = split_path ( path , 1 , 3 , True ) #NEWLINE# if o : #NEWLINE# #INDENT# func = object_func #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if c : #NEWLINE# #INDENT# func = container_func #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# func = account_func #NEWLINE# #UNINDENT# #UNINDENT# resp = func ( ipaddr , port , device , partition , method , path , headers = headers , query_string = query_string ) #NEWLINE# return resp #NEWLINE# #UNINDENT# return http_connect