-
Notifications
You must be signed in to change notification settings - Fork 13.3k
server.send send unexpected argument migrating from 2.4.x to 2.5.2 #6435
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
Comments
|
Hi dav, thanks for the feedback. Another part of my code is transferring an argument composed by different part separated by a semicolon ";". ` { extern struct zone tmpServerZone[NUM_OF_ZONES];
}` SO checking the returned arg I have one for any ";" and it is not correct. |
@Sparatutto I don't understand why you can't just ignore plain. In your original post, please explain the expected output vs. the output that you get. Also, add hints to the code explaining why you can't ignore plain. |
Hi Devyte, Regarding the code, I have conditional code based on the number of arguments and the content, maybe it is not the best way but it is what I have. // if the read/detail button is pressed the server send the information of the selected module
if((server.args() == 1) && (server.hasArg("Req")))
{
module=server.arg("Req").toInt();
logTime();
//Serial.printf("superclient: module %02d @%s:%s STATUS REQUEST ", module, serverModules[module].moduleIP,serverModules[module].modulePort);
Serial.printf("superclient: module %02d @%s:%d STATUS REQUEST ", module, serverModules[module].moduleIP,serverModules[module].modulePort);
receivedTime = manageServerToClient(module); //manageServerToClient(module, &zoneStatusClient);
//Serial.println("Time received from module:" + (String)receivedTime);
if(receivedTime>=0)
{
addAns = true;
}
}
// if the send button of a zone is pressed the corresponding zone of the selected module is updated
if((server.args() == 10) && (server.hasArg("Name")))
{
module=server.arg("Name").toInt();
tmpZone = server.arg("zone").toInt();
Serial.println("The module required is:" + server.arg("Name") + " ZOne: " + server.arg("zon") + " - " + (String)tmpZone);
tmpServerZone[tmpZone].instantOnOff = server.arg("in").toInt();
tmpServerZone[tmpZone].nonc = server.arg("mo").toInt();
if(tmpServerZone[tmpZone].instantOnOff != ZONE_INPUT)
{
tmpServerZone[tmpZone].timeOn_1=server.arg("TB").substring(0,server.arg("TB").indexOf(":")).toInt()*MINUT_CONVER+server.arg("TB").substring(server.arg("TB").indexOf(":")+1).toInt();
tmpServerZone[tmpZone].timeOff_1= server.arg("TE").substring(0,server.arg("TE").indexOf(":")).toInt()*MINUT_CONVER + server.arg("TE").substring(server.arg("TE").indexOf(":")+1).toInt();
tmpServerZone[tmpZone].timeOn_2 = ....
...
}
...
// Send the initial part of the HTML web page
server.send(200, "text/html", "");
server.sendContent(webPage);
//this occours only at the first login or any time the list button is pressed
if(server.args() == 0)
{
...
}
thx. |
@Sparatutto #6768 addresses your concern about About These fixes may be available in core-2.6.1. |
You should have opened a new issue back then so it may not have been forgotten.
|
Reopening |
@d-a-v thanks. and sorry for my mistake |
Basic Infos
I have read the documentation at readthedocs and the issue is not addressed there.
I have searched the issue tracker for a similar issue.
Platform
Settings in IDE
attached picture

Problem Description
I have updated the Arduino IDE to 1.8.9 and the core to 2.5.2 using the board manager ( not the git).

Compiling my project that was working and running very stable with the core 2.4.x now I'm facing some issue related to the number of argument returned by the http communication.
In particular I see an extra argument named plain received by the AP, that was not present and transferred before.
So expected number of arguments (correct in the last compile with 2.4.x) in this example was 3, instead with the new core I get 4.
And this is making me crazy because I have many pages and not sure what is happening.
Maybe it is a stupid error of mine but having it in conjunction to the switch to this new core, I try to write you for a check.
Thanks!
MCVE Sketch
Debug Messages
The text was updated successfully, but these errors were encountered: