summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/curl/http.c2
-rw-r--r--src/util/file/file_linux.c2
-rw-r--r--src/util/file/file_stdio.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/curl/http.c b/src/curl/http.c
index 154e0c7..cfb8a18 100644
--- a/src/curl/http.c
+++ b/src/curl/http.c
@@ -12,7 +12,7 @@ static void check_status_codes(struct nn_curl *curl)
http->callback(http->userdata, NNWT_HTTP_RESPONSE_CODE, NULL, &http->status_code);
}
}
- if (http->content_length < 0) {
+ if (http->content_length < 0 && http->status_code / 100 == 2) {
curl_easy_getinfo(curl->handle, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &http->content_length);
if (http->content_length >= 0) {
http->callback(http->userdata, NNWT_HTTP_CONTENT_LENGTH, NULL, &http->content_length);
diff --git a/src/util/file/file_linux.c b/src/util/file/file_linux.c
index 9693d4b..6537d26 100644
--- a/src/util/file/file_linux.c
+++ b/src/util/file/file_linux.c
@@ -1,4 +1,4 @@
-#define AL_LOG_SECTION "file_linux"
+#define AL_LOG_SECTION "file"
#include <al/log.h>
#include <sys/mman.h>
diff --git a/src/util/file/file_stdio.c b/src/util/file/file_stdio.c
index 48dd545..ae07908 100644
--- a/src/util/file/file_stdio.c
+++ b/src/util/file/file_stdio.c
@@ -1,4 +1,4 @@
-#define AL_LOG_SECTION "file_stdio"
+#define AL_LOG_SECTION "file"
#include <al/log.h>
#include <al/lib.h>