def parse_if_header_dict(environ):
if "<STR_LIT>" in environ:<EOL><INDENT>return<EOL><DEDENT>if "<STR_LIT>" not in environ:<EOL><INDENT>environ["<STR_LIT>"] = None<EOL>environ["<STR_LIT>"] = []<EOL>return<EOL><DEDENT>iftext = environ["<STR_LIT>"].strip()<EOL>if not iftext.startswith("<STR_LIT:<>"):<EOL><INDENT>iftext = "<STR_LIT>" + iftext<EOL><DEDENT>ifDict = dict([])<EOL>ifLockList = []<EOL>resource1 = "<STR_LIT:*>"<EOL>for (tmpURLVar, URLVar, _tmpContentVar, contentVar) in reIfSeparator.findall(<EOL>iftext<EOL>):<EOL><INDENT>if tmpURLVar != "<STR_LIT>":<EOL><INDENT>resource1 = URLVar<EOL><DEDENT>else:<EOL><INDENT>listTagContents = []<EOL>testflag = True<EOL>for listitem in reIfTagListContents.findall(contentVar):<EOL><INDENT>if listitem.upper() != "<STR_LIT>":<EOL><INDENT>if listitem.startswith("<STR_LIT:[>"):<EOL><INDENT>listTagContents.append(<EOL>(testflag, "<STR_LIT>", listitem.strip('<STR_LIT>'))<EOL>)<EOL><DEDENT>else:<EOL><INDENT>listTagContents.append(<EOL>(testflag, "<STR_LIT>", listitem.strip("<STR_LIT>"))<EOL>)<EOL>ifLockList.append(listitem.strip("<STR_LIT>"))<EOL><DEDENT><DEDENT>testflag = listitem.upper() != "<STR_LIT>"<EOL><DEDENT>if resource1 in ifDict:<EOL><INDENT>listTag = ifDict[resource1]<EOL><DEDENT>else:<EOL><INDENT>listTag = []<EOL>ifDict[resource1] = listTag<EOL><DEDENT>listTag.append(listTagContents)<EOL><DEDENT><DEDENT>environ["<STR_LIT>"] = ifDict<EOL>environ["<STR_LIT>"] = ifLockList<EOL>_logger.debug("<STR_LIT>".format(pformat(ifDict)))<EOL>return<EOL>
Parse HTTP_IF header into a dictionary and lists, and cache the result.

    @see http://www.webdav.org/specs/rfc4918.html#HEADER_If