Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

catchAll handler not working #12

Closed
roma2580 opened this issue Jan 29, 2023 · 5 comments
Closed

catchAll handler not working #12

roma2580 opened this issue Jan 29, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@roma2580
Copy link

Many thanks for this great library ! I was able to port an existing not-too-small ESP8266 project to RP within few hours. This project even includes Web sockets, and everything seemed to work fine until I happened to enter a non-existing url.
In order to exclude any self-made nonsense, I tried the same situation with the example program that comes with the library, and found the same problem.

Describe the bug

There is no visible response in the browser when requesting a non-existing url.

Steps to Reproduce

Compile the original example Async_AdvancedWebServer.ino, nothing changed but ssid[] and pass[].
Enter the IP in the browser (e.g. 192.168.100.121) and see the correct page, with the nice animated diagram.
Enter the prepared alternative url (e.g. 192.168.100.121/inline) and see the correct response text "This works as well".
But:
Try any other url (e.g. 192.168.100.121/xyz.htm) and see nothing but a blank screen! The Firefox debugging tool explains that the http response code is 501, and content length is 0.

Expected behavior

Looking into the function handleNotFound() in the example code, we would expect a text like "File Not Found", the uri and the http method GET. Moreover, the http response should be 404.

Actual behavior

(see "steps to reproduce")

Debug and AT-command log (if applicable)

(n.a.)

Screenshots

(n.a.)

Supporting information:

Library v1.4.1
Arduino IDE 1.8.19
RP2040 core v2.7.1
RASPBERRY_PI_PICO_W
Windows 7 64bit
Dell Latitude E6530

@roma2580 roma2580 changed the title WS: catchAll handler not working catchAll handler not working Jan 29, 2023
@khoih-prog
Copy link
Owner

HI @roma2580

Thanks for your nice encouraging words, and glad the library can somehow help you. Actually most of the credits must go to the original author(s) of ESPAsyncWebServer, I've just modified a little bit to port to RP2040W.

I actually can duplicate the bug and will spend some time to locate and fix, if possible and time permitted. Luckily the bug is not fatal and prevent the operation of the AsyncWebServer.

Will try fixing soon. If you can help somehow, I'd appreciate it.

Regards,

@khoih-prog khoih-prog added the bug Something isn't working label Jan 30, 2023
@roma2580
Copy link
Author

roma2580 commented Jan 30, 2023 via email

@roma2580
Copy link
Author

roma2580 commented Jan 30, 2023 via email

@khoih-prog
Copy link
Owner

Hi @roma2580

Wow, thanks for your good work, which saves me lot of time. I'm sure there is the same bug on some of my other AsyncWebServer to be fixed. Will look.

There are so many libraries and new things make me sometimes losing track of many things. Your help and contribution will be noted and make the libraries better and better everyday.

Will test and create a new release ASAP.

Best Regards,

khoih-prog added a commit that referenced this issue Jan 30, 2023
#### Release v1.5.0

1. Fix `_catchAllHandler` not working bug. Check [catchAll handler not working #12](#12)
@khoih-prog
Copy link
Owner

Hi @roma2580

The AsyncWebServer_RP2040W v1.5.0 has just been published. Your contribution is noted in Contributions and Thanks.

Please continue your great work of finding and fixing bugs. Waiting for many more of your bug-report / PRs.

Best Regards,


Release v1.5.0

  1. Fix _catchAllHandler not working bug. Check catchAll handler not working #12

khoih-prog added a commit to khoih-prog/Portenta_H7_AsyncWebServer that referenced this issue Jan 30, 2023
#### Release v1.5.0

1. Fix `_catchAllHandler` not working bug. Check [catchAll handler not working #12](khoih-prog/AsyncWebServer_RP2040W#12)
2. Improve `README.md` so that links can be used in other sites, such as `PIO`
khoih-prog added a commit to khoih-prog/Portenta_H7_AsyncWebServer that referenced this issue Jan 30, 2023
#### Release v1.5.0

1. Fix `_catchAllHandler` not working bug. Check [catchAll handler not working #12](khoih-prog/AsyncWebServer_RP2040W#12)
2. Improve `README.md` so that links can be used in other sites, such as `PIO`
khoih-prog added a commit to khoih-prog/Portenta_H7_AsyncWebServer that referenced this issue Jan 30, 2023
#### Release v1.5.0

1. Fix `_catchAllHandler` not working bug. Check [catchAll handler not working #12](khoih-prog/AsyncWebServer_RP2040W#12)
2. Improve `README.md` so that links can be used in other sites, such as `PIO`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants