From a1b8c1c9f8af995eed1e0f4294e133957745a2dd Mon Sep 17 00:00:00 2001 From: Adam McDaniel Date: Tue, 15 Nov 2022 12:10:37 -0700 Subject: [PATCH] Add documentation to resolve the "Header Fields are too long" issue Setting CONFIG_HTTPD_MAX_URI_LEN=1024 in your project's sdkconfig.defaults file will ensure the captive portal works on more devices, like Android. Also applied the setting as under the examples. Fixes #147 --- README.md | 6 ++++++ examples/default_demo/sdkconfig.defaults | 1 + examples/http_hook/sdkconfig.defaults | 1 + 3 files changed, 8 insertions(+) diff --git a/README.md b/README.md index 43248f3d..48f647f5 100644 --- a/README.md +++ b/README.md @@ -123,6 +123,12 @@ EXTRA_COMPONENT_DIRS := components/ include $(IDF_PATH)/make/project.mk ``` +Update your `sdkconfig.defaults` to allow for larger HTTP Request URL lengths. This is required by some operating systems in order to use its captive portal UI to configure wifi. + +```config +CONFIG_HTTPD_MAX_URI_LEN=1024 +``` + Once this is done, you can now in your user code add the header: ```c diff --git a/examples/default_demo/sdkconfig.defaults b/examples/default_demo/sdkconfig.defaults index f44c06f4..af997d5b 100644 --- a/examples/default_demo/sdkconfig.defaults +++ b/examples/default_demo/sdkconfig.defaults @@ -1 +1,2 @@ CONFIG_LWIP_IPV6=y +CONFIG_HTTPD_MAX_URI_LEN=1024 diff --git a/examples/http_hook/sdkconfig.defaults b/examples/http_hook/sdkconfig.defaults index f44c06f4..af997d5b 100644 --- a/examples/http_hook/sdkconfig.defaults +++ b/examples/http_hook/sdkconfig.defaults @@ -1 +1,2 @@ CONFIG_LWIP_IPV6=y +CONFIG_HTTPD_MAX_URI_LEN=1024