summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpillip8282 <pilseob.kang@samsung.com>2017-10-18 19:36:47 +0900
committerGitHub <noreply@github.com>2017-10-18 19:36:47 +0900
commit390d78f2fd5f338c07ab6eec3384b48b1d2bedf1 (patch)
tree67d0f8a55c3520b685fa02eefb8db63b6cdc6019
parent9036ed6248d21f7558dce13da3b734302c4cfd7f (diff)
downloadtinyara-390d78f2fd5f338c07ab6eec3384b48b1d2bedf1.tar.gz
tinyara-390d78f2fd5f338c07ab6eec3384b48b1d2bedf1.tar.bz2
tinyara-390d78f2fd5f338c07ab6eec3384b48b1d2bedf1.zip
Revert "Add an error handling code and an initialization function in webserver&client"
-rw-r--r--external/webclient/webclient.c11
-rw-r--r--external/webserver/http_client.c10
2 files changed, 1 insertions, 20 deletions
diff --git a/external/webclient/webclient.c b/external/webclient/webclient.c
index 75f8ea6e..40afc32b 100644
--- a/external/webclient/webclient.c
+++ b/external/webclient/webclient.c
@@ -89,7 +89,6 @@
#include "../webserver/http_string_util.h"
#include "../webserver/http_client.h"
-#include <protocols/webserver/http_err.h>
#include <protocols/webclient.h>
#if defined(CONFIG_NETUTILS_CODECS)
# if defined(CONFIG_CODECS_URLCODE)
@@ -1060,11 +1059,6 @@ retry:
&encoding, &state, &mlen,
param->response->headers,
NULL, param->response, NULL);
-
- if (read_finish == HTTP_ERROR) {
- ndbg("Error: Parse message Fail\n");
- goto errout;
- }
}
param->response->method = param->method;
@@ -1209,11 +1203,6 @@ static pthread_addr_t wget_base(void *arg)
&encoding, &state, &mlen,
param->response->headers,
NULL, param->response, NULL);
-
- if (read_finish == HTTP_ERROR) {
- ndbg("Error: Parse message Fail\n");
- goto errout;
- }
}
param->response->method = param->method;
diff --git a/external/webserver/http_client.c b/external/webserver/http_client.c
index edcbb31e..482aba6e 100644
--- a/external/webserver/http_client.c
+++ b/external/webserver/http_client.c
@@ -215,12 +215,7 @@ int http_parse_message(char *buf, int buf_len, int *method, char *url,
buf[sentence_end] = '\0';
if (strlen(buf + len->sentence_start) > 0) {
/* Read parameters */
- int result = http_separate_keyvalue(buf + len->sentence_start, key, value);
- if (result == HTTP_ERROR) {
- HTTP_LOGE("Error: Fail to separate keyvalue\n");
- http_keyvalue_list_release(params);
- return HTTP_ERROR;
- }
+ http_separate_keyvalue(buf + len->sentence_start, key, value);
HTTP_LOGD("[HTTP Parameter] Key: %s / Value: %s\n", key, value);
http_keyvalue_list_add(params, key, value);
@@ -247,7 +242,6 @@ int http_parse_message(char *buf, int buf_len, int *method, char *url,
entity = HTTP_MALLOC(HTTP_CONF_MAX_ENTITY_LENGTH);
if (entity == NULL) {
HTTP_LOGE("Error: Fail to alloc memory\n");
- http_keyvalue_list_release(params);
return HTTP_ERROR;
}
*enc = HTTP_CHUNKED_ENCODING;
@@ -258,8 +252,6 @@ int http_parse_message(char *buf, int buf_len, int *method, char *url,
HTTP_LOGD("Weblient cannot support chunked encoding.\n");
}
}
- HTTP_MEMSET(key, 0, HTTP_CONF_MAX_KEY_LENGTH);
- HTTP_MEMSET(value, 0, HTTP_CONF_MAX_VALUE_LENGTH);
} else {
*state = HTTP_REQUEST_BODY;
}