esp32 header fields are too long issue

error log

httpd_txrx: httpd_resp_send_err: 431 Request Header Fields Too Large - Header fields are too long for server to interpret

解决

在menuconfig中,调整HTTPD_MAX_REQ_HDR_LEN 的值:

menuconfig=>component config=>HTTP server=>max http request header leagth

官方其实已经对此问题做了说明,\examples\protocols\http_server\simple\README.md

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

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注