def make_complete_url(environ, localUri=None):
url = environ["<STR_LIT>"] + "<STR_LIT>"<EOL>if environ.get("<STR_LIT>"):<EOL><INDENT>url += environ["<STR_LIT>"]<EOL><DEDENT>else:<EOL><INDENT>url += environ["<STR_LIT>"]<EOL>if environ["<STR_LIT>"] == "<STR_LIT>":<EOL><INDENT>if environ["<STR_LIT>"] != "<STR_LIT>":<EOL><INDENT>url += "<STR_LIT::>" + environ["<STR_LIT>"]<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if environ["<STR_LIT>"] != "<STR_LIT>":<EOL><INDENT>url += "<STR_LIT::>" + environ["<STR_LIT>"]<EOL><DEDENT><DEDENT><DEDENT>url += compat.quote(environ.get("<STR_LIT>", "<STR_LIT>"))<EOL>if localUri is None:<EOL><INDENT>url += compat.quote(environ.get("<STR_LIT>", "<STR_LIT>"))<EOL>if environ.get("<STR_LIT>"):<EOL><INDENT>url += "<STR_LIT:?>" + environ["<STR_LIT>"]<EOL><DEDENT><DEDENT>else:<EOL><INDENT>url += localUri  <EOL><DEDENT>return url<EOL>
URL reconstruction according to PEP 333.
    @see https://www.python.org/dev/peps/pep-3333/#url-reconstruction