Skip to content

Update PicoW_CircuitPython_HTTP_Server for new adafruit_httpserver li… #2375

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

Merged
merged 3 commits into from
Jan 14, 2023

Conversation

anecdata
Copy link
Member

@anecdata anecdata commented Jan 3, 2023

…brary version 2.0.0

Tested the edited routes on Adafruit CircuitPython 8.0.0-beta.6 on 2022-12-21; Raspberry Pi Pico W with rp2040, but without the static ipconfig, outputs, and displayio.

…brary version 2.0.0

Tested the edited routes on `Adafruit CircuitPython 8.0.0-beta.6 on 2022-12-21; Raspberry Pi Pico W with rp2040`, but without the static ipconfig, outputs, and displayio.
@anecdata
Copy link
Member Author

anecdata commented Jan 3, 2023

Edited test code here.

code.py output:
Connected to WiFi
starting server..
Listening on http://192.168.6.198:80
POST / HTTP/1.1
Host: 192.168.6.198
Origin: http://192.168.6.198
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
Connection: keep-alive
Upgrade-Insecure-Requests: 1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.2 Safari/605.1.15
Referer: http://192.168.6.198/
Content-Length: 9
Accept-Language: en-US,en;q=0.9

LED+ON=ON
POST / HTTP/1.1
Host: 192.168.6.198
Origin: http://192.168.6.198
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
Connection: keep-alive
Upgrade-Insecure-Requests: 1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.2 Safari/605.1.15
Referer: http://192.168.6.198/
Content-Length: 11
Accept-Language: en-US,en;q=0.9

LED+OFF=OFF
POST / HTTP/1.1
Host: 192.168.6.198
Origin: http://192.168.6.198
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
Connection: keep-alive
Upgrade-Insecure-Requests: 1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.2 Safari/605.1.15
Referer: http://192.168.6.198/
Content-Length: 11
Accept-Language: en-US,en;q=0.9

party=party
connected
connected
connected

@dhalbert dhalbert marked this pull request as ready for review January 14, 2023 15:14
Copy link
Contributor

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full test with all the hardware. Found one existing bug (not from this PR): temp_test was already a string, so on the 30 second cycle, it would raise (and discard) an exception due to the %d in the format string. Changed to %s.

Thanks @anecdata!

@dhalbert dhalbert merged commit b06fd02 into main Jan 14, 2023
@dhalbert dhalbert deleted the anecdata-patch-1 branch January 14, 2023 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants