Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Legacy code using WebServer broke. Anyone have insight? #7662

kbola started this conversation in General
Discussion options

Hi There,

I've inherited a legacy firmware project that runs well on previously shipped devices, but the same code built now does not. I do not have information about the version of this library that was used before.

I'm not reporting this as an issue, more so looking for insight on a technique that a past programmer used successfully but now doesn't work on my setup.

Namely we receive a 'Not found' when handling the 'set' request below but 'restart' works. I suspect that the culprit is the curly brackets used to indicate a wildcard input -- was this something that was formerly supported? Or could this be a compiler difference? Or something else that has changed in the 3-4 years since the older firmware was shipped?

server.on("/restart", handleRestart);
server.on("/set/{}", handleSet);

We're building from the Arduino IDE 1.8.19
Tried this with Arduino-esp32 version 1.05, 1.06, and the latest stable release.

Any insight would be much appreciated! I'd love to get it running as it did before making changes as I suspect a library or compiler issue is the cause.

Cheers

You must be logged in to vote

Replies: 1 comment

Comment options

I'm not familiar with a wildcard option. The curly brackets look wrong there. Does it work if you remove them? Are you using the WebServer built into Arduino-esp32, or a third party library like ESPAsyncWebserver?
Normally URL parameters are passed with a question mark www.test.com?name=Adam

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /