diff options
author | June McEnroe <june@causal.agency> | 2019-09-05 20:09:34 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-09-05 20:09:34 -0400 |
commit | f0bbb49d1cf6d0f6d2544ca6a88828c00a2f6b18 (patch) | |
tree | e9527b37bbf201c51e1321ff63319750f169e75a | |
parent | Use CURLINFO_CONTENT_TYPE (diff) | |
download | src-f0bbb49d1cf6d0f6d2544ca6a88828c00a2f6b18.tar.gz src-f0bbb49d1cf6d0f6d2544ca6a88828c00a2f6b18.zip |
Handle lack of Content-Type
-rw-r--r-- | bin/title.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/title.c b/bin/title.c index 9a74b7f5..e070653a 100644 --- a/bin/title.c +++ b/bin/title.c @@ -119,7 +119,7 @@ static CURLcode fetchTitle(const char *url) { char *type; code = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &type); if (code) return code; - if (strncmp(type, "text/html", 9)) return CURLE_OK; + if (!type || strncmp(type, "text/html", 9)) return CURLE_OK; body.len = 0; curl_easy_setopt(curl, CURLOPT_NOBODY, 0L); |