The default in build for this configuration parameter: CONFIG_HTTPD_MAX_REQ_HDR_LEN is 512 bytes.
This is causing "Header fields are too long for server to interpret" errors on a single field form post.
It needs to be set at least 768 bytes, but 1024 would be better.
This is a burden for customers using Arduino because the binary isn't easy to recompile.
For example, using Wireshark, this is the "post" header for Google Chrome on MacOS on the latest Catalina:
(it's 554 bytes plus CR/LFs not shown)
Host: 192.168.4.1
Connection: keep-alive
Content-Length: 95
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
Origin: http://192.168.4.1
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.55 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Referer: http://192.168.4.1/
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9,pl;q=0.8
For a Chrome "get" header is at least 478 bytes ....
Host: 192.168.4.1\r\n
Connection: keep-alive\r\n
Upgrade-Insecure-Requests: 1\r\n
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.55 Safari/537.36\r\n
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9\r\n
Referer: http://192.168.4.1/\r\n
Accept-Encoding: gzip, deflate\r\n
Accept-Language: en-US,en;q=0.9,pl;q=0.8\r\n
\r\n
sdkconfig - CONFIG_HTTPD_MAX_REQ_HDR_LEN=512 byte default value too small
Re: sdkconfig - CONFIG_HTTPD_MAX_REQ_HDR_LEN=512 byte default value too small
I think for Arduino project it's pretty easy to set a larger default value in the configuration used to compile the libraries. Could you please open an issue about that at https://github.com/espressif/arduino-esp32/issues?
Re: sdkconfig - CONFIG_HTTPD_MAX_REQ_HDR_LEN=512 byte default value too small
Done: https://github.com/espressif/arduino-esp32/issues/5969
However, I believe this default should not just be changed in Arduino but rather system-wide as Chrome has likely "grown" the header to a point where specifying a max value of 512 for that header buffer is just too small.
Post Packet 218
Post Response Error Packet 219
However, I believe this default should not just be changed in Arduino but rather system-wide as Chrome has likely "grown" the header to a point where specifying a max value of 512 for that header buffer is just too small.
Post Packet 218
Post Response Error Packet 219
Who is online
Users browsing this forum: No registered users and 33 guests