Some header values might be delimited with spaces, so it's not enough to compare "close" or "keep-alive" with strncasecmp(). Use word_match() for that.