Caerbannog/esphttpclient

esp8266 Fatal exception from http_get

reaper7 opened this issue · 1 comments

I try to execute this request:
http_get("http://api.thingspeak.com/update?key=ABCBCACABCBA1234&field1=0&field2=24.0&headers=false", http_callback_example);
and from httpclient.c->http_post I got:

hostname=api.thingspeak.com
port=80
path=/update?key=ABCBCACABCBA1234&field1=0&field2=24.0&headers=false

next executed is: http_raw_request ... req->post_data = esp_strdup(post_data);
give Fatal exception because post_data is NULL

temporary solution are inside static char * esp_strdup(const char * str)
add:
if (str == NULL) return NULL;
with this everything works good

You were right.
Fixed in commit 09fdd8e.
Thank you!