diff --git a/examples/http_get/main.c b/examples/http_get/main.c index 6d13622..2e68901 100644 --- a/examples/http_get/main.c +++ b/examples/http_get/main.c @@ -78,7 +78,7 @@ void http_get_task(void *pvParameters) "GET "WEB_URL"\r\n" "User-Agent: esp-open-rtos/0.1 esp8266\r\n" "\r\n"; - if (write(s, req, strlen(req) + 1) < 0) { + if (write(s, req, strlen(req)) < 0) { printf("... socket send failed\r\n"); close(s); vTaskDelay(4000 / portTICK_RATE_MS); diff --git a/examples/http_get_ssl/main.c b/examples/http_get_ssl/main.c index aaac5b5..7dfbc97 100644 --- a/examples/http_get_ssl/main.c +++ b/examples/http_get_ssl/main.c @@ -119,7 +119,7 @@ void http_get_task(void *pvParameters) "GET "WEB_URL"\r\n" "User-Agent: esp-open-rtos/0.1 esp8266\r\n" "\r\n"; - if (ssl_write(ssl, (uint8_t *)req, strlen(req) + 1) < 0) { + if (ssl_write(ssl, (uint8_t *)req, strlen(req)) < 0) { printf("... socket send failed\r\n"); ssl_free(ssl); close(s);