Git Product home page Git Product logo

Comments (8)

craigdetter avatar craigdetter commented on July 2, 2024

The 554 byte header size referenced in the original post uses a plain old HTML5 form with a method="post".

Out of curiosity, I also captured a Wireshark trace that employs a Javascript XMLHttpRequest to send data to the ESP32. Writing a quick test page a Javascript XMLHttpRequest currently uses a 495-byte header (just under 512) - again using the Chrome browser. If the Chrome team makes a small change, sayonara.

The Javascript test code used:

var gHttpReq;

function postHttpData() {
	
	if (window.XMLHttpRequest) { 
	  gHttpReq = new XMLHttpRequest();
	}
	else {
	  gHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	gHttpReq.open("POST", "/post/setup_form_content?"); 
	gHttpReq.onload = function(event){ 
	    alert("Success, server responded with: " + event.target.response); 
	}; 
	
	var formData = new FormData(document.getElementById("setup-form")); 
	gHttpReq.send(formData);
}

The Wireshark trace captured this header:

Host: 192.168.4.1\r\n
Connection: keep-alive\r\n
Content-Length: 592\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
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryPKtEBbYhTg3YzO0z\r\n
Accept: /\r\n
Origin: http://192.168.4.1\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

See packet 1 in the Wireshark trace screen snapshot below....

Screen Shot 2021-12-06 at 10 58 33 AM

from esp32-arduino-lib-builder.

LenShustek avatar LenShustek commented on July 2, 2024

This problem has been talked about for years in various forums. Will it ever get fixed?

Until this is fixed, a server using arduino-esp32 that implements any web page buttons will fail when the client browser is Chrome or Edge. It works with Firefox and the (obsolete) Internet Explorer, but a that's not a requirement you can impose on users. Please help, or we need to abandon the Arduino IDE!

from esp32-arduino-lib-builder.

me-no-dev avatar me-no-dev commented on July 2, 2024

Will it ever get fixed?

Done. Sorry for the delay :)

from esp32-arduino-lib-builder.

LenShustek avatar LenShustek commented on July 2, 2024

Wonderful, thanks! When will the change appear in espressif/arduino-esp32 so we can use it?

from esp32-arduino-lib-builder.

me-no-dev avatar me-no-dev commented on July 2, 2024

Next time that there is something new in ESP-IDF v4.4, the lib-builder will rebuild and create PR to arduino-esp32. When we merge that PR, it will be available through git.

from esp32-arduino-lib-builder.

Patsjemoe avatar Patsjemoe commented on July 2, 2024

Hi,
I was using Firefox, so could get around it.
But now I am using Webview in Android Studio, and have again the problem of headers too long.
Changing the HTTPD_MAX value in sdkconfig does not solve the issue.
Is there a "real" solution in the mean time ?
thanks in advance
best regards
Ludo

from esp32-arduino-lib-builder.

DonMorr avatar DonMorr commented on July 2, 2024

Hi, I was using Firefox, so could get around it. But now I am using Webview in Android Studio, and have again the problem of headers too long. Changing the HTTPD_MAX value in sdkconfig does not solve the issue. Is there a "real" solution in the mean time ? thanks in advance best regards Ludo

Hi @Patsjemoe , did you have any luck sorting this? I'm hitting the exact same issue. Cheers, Donal

from esp32-arduino-lib-builder.

LenShustek avatar LenShustek commented on July 2, 2024

I believe it was fixed in version 2.0.4 of the Espressif Arduino core at https://github.com/espressif/arduino-esp32. I see they're up to 2.0.5 now.

from esp32-arduino-lib-builder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.