added content-type handling from downloaded url