def read_timeout_value_header(timeoutvalue):
timeoutsecs = <NUM_LIT:0><EOL>timeoutvaluelist = timeoutvalue.split("<STR_LIT:U+002C>")<EOL>for timeoutspec in timeoutvaluelist:<EOL><INDENT>timeoutspec = timeoutspec.strip()<EOL>if timeoutspec.lower() == "<STR_LIT>":<EOL><INDENT>return -<NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>listSR = reSecondsReader.findall(timeoutspec)<EOL>for secs in listSR:<EOL><INDENT>timeoutsecs = int(secs)<EOL>if timeoutsecs > MAX_FINITE_TIMEOUT_LIMIT:<EOL><INDENT>return -<NUM_LIT:1><EOL><DEDENT>if timeoutsecs != <NUM_LIT:0>:<EOL><INDENT>return timeoutsecs<EOL><DEDENT><DEDENT><DEDENT><DEDENT>return None<EOL>
Return -1 if infinite, else return numofsecs.