Handle case when headers argument is array-like.