summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-09-05 20:09:34 -0400
committerJune McEnroe <june@causal.agency>2019-09-05 20:09:34 -0400
commit049da6dc7be51d934cf0c95af5270e6c8b6466bf (patch)
tree9a632cce1aad2ded974d7f4fe82859a890f2f289
parentUse CURLINFO_CONTENT_TYPE (diff)
downloadsrc-049da6dc7be51d934cf0c95af5270e6c8b6466bf.tar.gz
src-049da6dc7be51d934cf0c95af5270e6c8b6466bf.zip
Handle lack of Content-Type
Diffstat (limited to '')
-rw-r--r--bin/title.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/title.c b/bin/title.c
index 02076073..f80640bd 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);