Updating the headers check method to include downcase and strip