From a45a7bbd0aa11c1e31395e917361b65f9481624a Mon Sep 17 00:00:00 2001 From: MagicSmokeSolutions <66403704+MagicSmokeSolutions@users.noreply.github.com> Date: Sun, 4 Jun 2023 16:04:05 -0700 Subject: [PATCH] Add documentation to resolve the "Header Fields are too long" issue (#4) 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 Authored-by: Adam McDaniel --- 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