make curl header check case insensitive

Trying to use curl instead of remote failed for a camera where the content length header was sent as "Content-length", not "Content-Length" as specified in the source. Made the checks for content-type and content-length case insensitive to work around the problem.