From 4ad15b09d36c67b856727d26fea77240475bbf85 Mon Sep 17 00:00:00 2001 From: yuqing Date: Tue, 17 Jun 2014 18:31:25 +0800 Subject: [PATCH] bug fixed --- src/http_func.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/http_func.c b/src/http_func.c index 4531356..7db86cb 100644 --- a/src/http_func.c +++ b/src/http_func.c @@ -52,7 +52,7 @@ int get_url_content_ex(const char *url, const int url_len, else { bNeedAlloc = false; - alloc_size = *content_len; + alloc_size = *content_len - 1; } *content_len = 0; @@ -205,8 +205,11 @@ int get_url_content_ex(const char *url, const int url_len, do { - if (result != ENOTCONN) + if (result == ENOTCONN) { + result = 0; + } + else { sprintf(error_info, "file: "__FILE__", line: %d, " \ "recv data from %s:%d fail, errno: %d, " \ "error info: %s", __LINE__, domain_name, \