{"action":"created","issue":{"url":"https://api.github.com/repos/me-no-dev/ESPAsyncWebServer/issues/86","repository_url":"https://api.github.com/repos/me-no-dev/ESPAsyncWebServer","labels_url":"https://api.github.com/repos/me-no-dev/ESPAsyncWebServer/issues/86/labels{/name}","comments_url":"https://api.github.com/repos/me-no-dev/ESPAsyncWebServer/issues/86/comments","events_url":"https://api.github.com/repos/me-no-dev/ESPAsyncWebServer/issues/86/events","html_url":"https://github.com/me-no-dev/ESPAsyncWebServer/issues/86","id":186173663,"number":86,"title":"parsing headers bug with amazon ECHO. ","user":{"login":"sticilface","id":10061736,"avatar_url":"https://avatars.githubusercontent.com/u/10061736?v=3","gravatar_id":"","url":"https://api.github.com/users/sticilface","html_url":"https://github.com/sticilface","followers_url":"https://api.github.com/users/sticilface/followers","following_url":"https://api.github.com/users/sticilface/following{/other_user}","gists_url":"https://api.github.com/users/sticilface/gists{/gist_id}","starred_url":"https://api.github.com/users/sticilface/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sticilface/subscriptions","organizations_url":"https://api.github.com/users/sticilface/orgs","repos_url":"https://api.github.com/users/sticilface/repos","events_url":"https://api.github.com/users/sticilface/events{/privacy}","received_events_url":"https://api.github.com/users/sticilface/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-30T23:34:10Z","updated_at":"2016-10-31T12:26:37Z","closed_at":"2016-10-31T12:26:37Z","body":"Took a while to track down.  I'm trying to write a responser to amazon ECHO.  I respond to a UDP ping with a URL, the amazon ECHO then requests a URL.  At this point every time I get a reboot to do with string concat...   I've added a print to the webrequest.cpp to dump the data.. and this is what i get everytime\n\n```\nResponse already sent under 1 sec ago\nDATA [61]: 47 45 54 20 2F 73 65 74 75 70 2E 78 6D 6C 20 48 54 54 50 2F 31 2E 31 0D 0A 48 6F 73 74 3A 20 31 39 32 2E 31 36 38 2E 31 2E 32 31 34 0D 0A 41 63 63 65 70 74 3A 20 2A 2F 2A 0D 0A 0D 0A \nDATA [36]: 48 6F 73 74 3A 20 31 39 32 2E 31 36 38 2E 31 2E 32 31 34 0D 0A 41 63 63 65 70 74 3A 20 2A 2F 2A 0D 0A 0D 0A \nDATA [15]: 41 63 63 65 70 74 3A 20 2A 2F 2A 0D 0A 0D 0A \nDATA [2]: 0D 0A \n\nException (28):\nepc1=0x40211081 epc2=0x00000000 epc3=0x00000000 excvaddr=0x0000000c depc=0x00000000\n\nctx: sys \nsp: 3ffffb70 end: 3fffffb0 offset: 01a0\n\n>>>stack>>>\n3ffffd10:  3fff489c 3fff0a20 3fff0a20 00000002  \n3ffffd20:  3fff489c 00000002 3fff48b0 402207a8  \n3ffffd30:  3ffec955 3fff0a20 3ffec955 00000002  \n3ffffd40:  3fff489c 00000002 3ffec955 402114bc  \n3ffffd50:  3fff48b0 00000001 3fff48b0 0000000f  \n3ffffd60:  3fff489c 0000000d 3fff489c 402110be  \n3ffffd70:  3ffec957 3fff48b0 3ffec956 402207a8  \n3ffffd80:  3ffec948 3fff0a20 3ffec948 0000000f  \n3ffffd90:  3fff489c 0000000d 3ffec948 4021130d  \n3ffffda0:  3ffe8551 3fff48b0 3fff48b0 00000024  \n3ffffdb0:  3fff489c 00000015 3fff489c 402110be  \n3ffffdc0:  3ffec957 3fff48b0 3ffec956 402207a8  \n3ffffdd0:  3ffec933 3fff0a20 3ffec933 00000024  \n3ffffde0:  3fff489c 00000015 3ffec933 4021130d  \n3ffffdf0:  40105287 3ffee788 3fff48b0 0000003d  \n3ffffe00:  3fff489c 00000019 3fff489c 40211031  \n3ffffe10:  3ffec957 3fff48b0 3ffec956 402207a8  \n3ffffe20:  3ffec91a 3fff0a20 3ffec91a 0000003d  \n3ffffe30:  3fff489c 00000019 3ffec91a 4021130d  \n3ffffe40:  3ffeb5c4 3ffeb5c4 00000001 00000001  \n3ffffe50:  00007fff 2e73616d 3fff489c 4010737c  \n3ffffe60:  3ffec957 3fff48b0 3ffec956 3fffc278  \n3ffffe70:  40103024 3fffc200 00000022 3fff4830  \n3ffffe80:  00000001 3fff2b14 3fff47dc 40211501  \n3ffffe90:  00000030 00000011 3fff47dc 4020d2f0  \n3ffffea0:  3fff4724 00000001 00000000 3fffdab0  \n3ffffeb0:  3fff2318 3fff2324 00000006 3fff212c  \n3ffffec0:  3fff4724 3fff2134 3fff2130 4020d343  \n3ffffed0:  3fff4724 3fff2134 3fff2130 40246e58  \n3ffffee0:  0000003d d601a8c0 00000018 0000003d  \n3ffffef0:  00000018 00000000 3fff0adc 4010736c  \n3fffff00:  40100000 00000000 00000064 3fff231c  \n3fffff10:  3ffec8f2 3fff2324 3fff2b14 4024535d  \n3fffff20:  3fff2040 3fff27dc 3fff27dc 3ffef8d0  \n3fffff30:  00000000 3fff2b14 0000001c 3fff27dc  \n3fffff40:  3ffec8e4 00000000 3fff2b14 40244755  \n3fffff50:  c001a8c0 0000009b 00000000 0000002c  \n3fffff60:  00000002 0000001a 4022517b 3ffee788  \n3fffff70:  3ffec8bc 3fffdcc0 3ffeadc8 3ffeadc8  \n3fffff80:  402250ee 3ffee788 00000000 3fff285c  \n3fffff90:  3fffdc80 00000000 3fff2b14 402391d7  \n3fffffa0:  40000f49 3fffdab0 3fffdab0 40000f49  \n<<<stack<<<\n```\n\nthe crash dump is here\n\n```\nDecoding 29 results\n0x402206e8: String::concat(char const*) at /Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 720\n0x4021147e: AsyncWebServerRequest::_onData(void*, unsigned int) at /Users/amelvin/Documents/Arduino/libraries/ESPAsyncWebServer/src/WebRequest.cpp line 583\n0x402110be: AsyncWebServerRequest::_parseLine() at /Users/amelvin/Documents/Arduino/libraries/ESPAsyncWebServer/src/WebRequest.cpp line 583\n0x402206e8: String::concat(char const*) at /Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 720\n0x402112b0: AsyncWebServerRequest::_onData(void*, unsigned int) at /Users/amelvin/Documents/Arduino/libraries/ESPAsyncWebServer/src/WebRequest.cpp line 583\n0x402110be: AsyncWebServerRequest::_parseLine() at /Users/amelvin/Documents/Arduino/libraries/ESPAsyncWebServer/src/WebRequest.cpp line 583\n0x402206e8: String::concat(char const*) at /Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 720\n0x402112b0: AsyncWebServerRequest::_onData(void*, unsigned int) at /Users/amelvin/Documents/Arduino/libraries/ESPAsyncWebServer/src/WebRequest.cpp line 583\n0x40211031: AsyncWebServerRequest::_parseLine() at /Users/amelvin/Documents/Arduino/libraries/ESPAsyncWebServer/src/WebRequest.cpp line 583\n0x402206e8: String::concat(char const*) at /Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/WString.cpp line 720\n0x402112b0: AsyncWebServerRequest::_onData(void*, unsigned int) at /Users/amelvin/Documents/Arduino/libraries/ESPAsyncWebServer/src/WebRequest.cpp line 583\n0x4010020c: _umm_free at /Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/umm_malloc/umm_malloc.c line 1287\n0x4010737c: vPortFree at /Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/heap.c line 18\n0x40241612: pbuf_free at /Users/igrokhotkov/espressif/arduino/tools/sdk/lwip/src/core/pbuf.c line 752\n0x402114a9: _M_invoke at /Users/amelvin/Documents/Arduino/libraries/ESPAsyncWebServer/src/WebRequest.cpp line 583\n0x40103024: wDev_ProcessFiq at ?? line ?\n0x4020d2f0: AsyncClient::_recv(tcp_pcb*, pbuf*, signed char) at /Users/amelvin/Documents/Arduino/libraries/ESPAsyncTCP/src/ESPAsyncTCP.cpp line 632\n0x4021779d: MDNSResponder::update() at /Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/libraries/ESP8266mDNS/ESP8266mDNS.cpp line 384\n0x4020d343: AsyncClient::_s_recv(void*, tcp_pcb*, pbuf*, signed char) at /Users/amelvin/Documents/Arduino/libraries/ESPAsyncTCP/src/ESPAsyncTCP.cpp line 632\n0x40246d98: tcp_input at /Users/igrokhotkov/espressif/arduino/tools/sdk/lwip/src/core/tcp_in.c line 394 (discriminator 1)\n0x4010736c: pvPortMalloc at /Applications/Arduino.app/Contents/Java/hardware/esp8266com/esp8266/cores/esp8266/heap.c line 13\n0x40100000: _stext at ?? line ?\n0x4024529d: ip_input at /Users/igrokhotkov/espressif/arduino/tools/sdk/lwip/src/core/ipv4/ip.c line 559\n0x40244695: ethernet_input at /Users/igrokhotkov/espressif/arduino/tools/sdk/lwip/src/netif/etharp.c line 1379\n0x402250bb: pp_tx_idle_timeout at ?? line ?\n0x4022502e: pp_tx_idle_timeout at ?? line ?\n0x40239117: ets_snprintf at ?? line ?\n```\n\nso im not sure exactly what is going on.  but thought i had enough to share... I think it might be the concatenation `DATA [2]: 0D 0A` that is causing the reset.  nonetheless I figure it should not crash the ESP.. \n\nThis line is the one that is causing the reset,\nhttps://github.com/me-no-dev/ESPAsyncWebServer/blob/master/src/WebRequest.cpp#L121\ncomment it out and there is no reset\nA\n"},"comment":{"url":"https://api.github.com/repos/me-no-dev/ESPAsyncWebServer/issues/comments/257280856","html_url":"https://github.com/me-no-dev/ESPAsyncWebServer/issues/86#issuecomment-257280856","issue_url":"https://api.github.com/repos/me-no-dev/ESPAsyncWebServer/issues/86","id":257280856,"user":{"login":"sticilface","id":10061736,"avatar_url":"https://avatars.githubusercontent.com/u/10061736?v=3","gravatar_id":"","url":"https://api.github.com/users/sticilface","html_url":"https://github.com/sticilface","followers_url":"https://api.github.com/users/sticilface/followers","following_url":"https://api.github.com/users/sticilface/following{/other_user}","gists_url":"https://api.github.com/users/sticilface/gists{/gist_id}","starred_url":"https://api.github.com/users/sticilface/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sticilface/subscriptions","organizations_url":"https://api.github.com/users/sticilface/orgs","repos_url":"https://api.github.com/users/sticilface/repos","events_url":"https://api.github.com/users/sticilface/events{/privacy}","received_events_url":"https://api.github.com/users/sticilface/received_events","type":"User","site_admin":false},"created_at":"2016-10-31T12:26:37Z","updated_at":"2016-10-31T12:26:37Z","body":"If you're getting crashes trying to include the asyncserver in a class...  you have to copy it by reference in the constructor...  (or pointer...)... not copy.... "}}
{"actor":{"display_login":"sticilface"}}