Merge branch 'bugfix/http_request_example' into 'master'

Fix issues with HTTP[S] request examples

This MR includes:

- request string fix for the http_request example (https://github.com/espressif/esp-idf/pull/500)
- same fix applied to the https_request example
- stack size increase for http_request example

Fixes https://www.esp32.com/viewtopic.php?f=13&t=1620

See merge request !646
This commit is contained in:
Ivan Grokhotkov 2017-04-13 15:27:37 +08:00
commit 8bc153e142
2 changed files with 9 additions and 9 deletions

View File

@ -46,10 +46,10 @@ const int CONNECTED_BIT = BIT0;
static const char *TAG = "example";
static const char *REQUEST = "GET " WEB_URL " HTTP/1.1\n"
"Host: "WEB_SERVER"\n"
"User-Agent: esp-idf/1.0 esp32\n"
"\n";
static const char *REQUEST = "GET " WEB_URL " HTTP/1.0\r\n"
"Host: "WEB_SERVER"\r\n"
"User-Agent: esp-idf/1.0 esp32\r\n"
"\r\n";
static esp_err_t event_handler(void *ctx, system_event_t *event)
{
@ -176,5 +176,5 @@ void app_main()
{
ESP_ERROR_CHECK( nvs_flash_init() );
initialise_wifi();
xTaskCreate(&http_get_task, "http_get_task", 2048, NULL, 5, NULL);
xTaskCreate(&http_get_task, "http_get_task", 4096, NULL, 5, NULL);
}

View File

@ -71,10 +71,10 @@ const int CONNECTED_BIT = BIT0;
static const char *TAG = "example";
static const char *REQUEST = "GET " WEB_URL " HTTP/1.1\n"
"Host: "WEB_SERVER"\n"
"User-Agent: esp-idf/1.0 esp32\n"
"\n";
static const char *REQUEST = "GET " WEB_URL " HTTP/1.0\r\n"
"Host: "WEB_SERVER"\r\n"
"User-Agent: esp-idf/1.0 esp32\r\n"
"\r\n";
/* Root cert for howsmyssl.com, taken from server_root_cert.pem