Renamed attemptDownload to get_content_type.
This subroutine now returns the content type (e.g. "application/pdf") if the
URL is something that can be downloaded, and 0 otherwise.