-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to change maximum header field length in processing GET requests (http server) #2983
Comments
@me-no-dev Sorry for tagging you into this, but I could use some help! Thanks |
I presume I can edit sdkconfig.h, but right at the very top of the file, there's a comment there that says :
Soooo what's the proper way to edit the settings/configs? |
I don't really have a solution for you, but at least I can answer some of your questions:
There is a handy little tool called Postman with which you could try access the ESP32 server. This tool gives you fine control over what information gets sent in the HTTP headers. With this you can try to figure out what works and what doesn't.
If you just want to see the headers you're sending to the ESP32, you could also use the Developer Tools in a browser on your PC whenever you navigate to the page (see the instructions for Firefox or Chrome).
Well, usualy, with the ESP-IDF framework, you can change configuration items using a config menu. This menu is invoked by executing Now, this Arduino core for the ESP32 is built around the ESP-IDF. Unfortunately, when you're using the Arduino IDE, there's currently no way of invoking the configuration menu that I know of. Someone please correct me if I'm wrong!
Because of the lack of invoking the configuration menu, I actually believe editing the Hope this helps! |
@SchemingWeasels
Any suggestions? |
Confirm. I'm developing an android app with MIT App Inventor and I received the error "Header fields are too long for server to interpret" when trying to connect to the camera streaming page. Only solution was to compile the camera example directly with ESP-IDF and chaning via make menuconfig the value HTTPD_MAX_REQ_HDR_LEN from 512 to 1024. It could be great if I could use Arduino IDE instead of ESP-IDF, especially for me that I'm not a professional. |
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
Rather than let this go stale, I think it really needs to be addressed somehow, 'Internet of things' devices that cannot be accessed via proxies or from remote networks are probably not what we want. Following the above and setting I'm going to make a second test later today to see what happens with |
[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future. |
Ok, I was able to do a couple of tests, connecting via VPN/SSH tunnel works for me so I have my solution. But I was not able to get an apache proxy working; even when changing CONFIG_HTTPD_MAX_REQ_HDR_LEN to 2048 and CONFIG_HTTPD_MAX_URI_LEN to 1024. It would still be nice to have these options exposed, somehow, in the Arduino IDE. Though I realise that is much easier to say than to actually do. |
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions. |
@easytarget Yes, it seems like the proxy is adding some header load to the original request. I was able to solve it in nginx by adding the |
To anybody who still has problem with request header field too large error (ERROR 431), you might be using old version of ESP32 board (1.0.6). To update to the latest version of 2.0.6 follow the tutorial using this link, https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html |
edit sdkconfig file, which will then put into sdkconfig.h |
What I'm trying to do:
Access ESP32 Camera Http Server Example (included in examples) over the internet, on an Android smartphone running chrome
What is failing: (what I'm failing at)
Hardware:
Board: ESP32-Cam module
Link to Board : https://www.aliexpress.com/item/32992663411.html?spm=a2g0s.9042311.0.0.15764c4dzmz0WC
Core Installation/update date: v1.0.2 in Boards Manager
IDE name: Arduino IDE
Flash Frequency: 80Mhz
PSRAM enabled: Yes
Upload Speed: 921600
Computer OS: Windows 10
Phone: Oneplus 6T running Andorid 9
Description:
What I've tried
config.max_resp_headers = 50;
Found this other person asking for help on the espressive forums, https://esp32.com/viewtopic.php?t=7685 but I have no idea what to do to change the limit.
How do I use the Kconfig file thing? It's right there but I have no idea how do I make the compiler use my values instead.
Read through this as well but I think it's meant for building the sdkconfig.h file https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/kconfig.html
Debug Messages:
Nothing of note. Posted either way
IP redacted
Apologies in Advance
I've got no formal education in coding, I've only picked up what I can from youtube tutorials and Arduino projects. I'm also not a native to the English language. Bare with me while I attempt to learn something in the process!
The text was updated successfully, but these errors were encountered: