Explain how to fix 'httpd_parse: header too long'

Because this is the 'simple' server example, it is probably where users will start out to understand the HTTP Server API; and also where they might come if they are having problems.
So I think it is useful to explain to users what to do if they see "httpd_parse: parse_block: request URI/header too long", which can easily happen if they submit a POST from an HTML form (for example). That certainly would have helped me!

Merges https://github.com/espressif/esp-idf/pull/6547

Signed-off-by: Shubham Kulkarni <shubham.kulkarni@espressif.com>
pull/6718/head
mjcross 2021-02-15 21:08:29 +00:00 zatwierdzone przez bot
rodzic 6a7587d35f
commit 03901946ba
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -20,5 +20,7 @@ The Example consists of HTTPD server demo with demostration of URI handling :
* since the server echoes back the request body, the two files should be same, as can be confirmed using : "cmp anyfile tmpfile"
3. "curl -X PUT -d "0" 192.168.43.130:80/ctrl" - disable /hello and /echo handlers
4. "curl -X PUT -d "1" 192.168.43.130:80/ctrl" - enable /hello and /echo handlers
* If the server log shows "httpd_parse: parse_block: request URI/header too long", especially when handling POST requests, then you probably need to increase HTTPD_MAX_REQ_HDR_LEN, which you can find in the project configuration menu (`idf.py menuconfig`): Component config -> HTTP Server -> Max HTTP Request Header Length
See the README.md file in the upper level 'examples' directory for more information about examples.