-
Notifications
You must be signed in to change notification settings - Fork 74
wsgiserver: implement parse_headers #115
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
Conversation
…en the wsgi application misbehaves, and make sure nobody think we can handle keep-alive requests.
Thanks @Anton-2 for this fix. I hope it gets merged soon since the wsgiserver is currently broken. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Anton-2 Apologies for the delay; parse_headers
exists in request as _parse_headers
a private-ish method of the class, WSGIServer needs to be updated to not try to parse the headers itself and instead access the parsed headers with Response.headers
.
@Anton-2 this is a long time (I know) are you still interested on working on this, if so, could you take intro consideration the comments above. let us know thanks :) |
|
@brentru Hello :) what are your thoughts on this? |
The proposed changes make sense to me. |
Good Thanks, if that is the case I think this is settled, I will let some day to merge to see after bumping this PR other folks have comments. Thanks |
Updating https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI to 3.5.11 from 3.5.10: > Moved default branch to main > Merge pull request adafruit/Adafruit_CircuitPython_ESP32SPI#115 from Anton-2/master Updating https://github.com/adafruit/Adafruit_CircuitPython_Seesaw to 1.9.1 from 1.9.0: > Merge pull request adafruit/Adafruit_CircuitPython_seesaw#74 from jposada202020/adding_new_example > Merge pull request adafruit/Adafruit_CircuitPython_seesaw#73 from kattni/rotary-neopixel-example > Merge pull request adafruit/Adafruit_CircuitPython_seesaw#71 from jposada202020/adding_new_guides Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1325 to 1.2.5 from 1.2.4: > Moved default branch to main > Moved CI to Python 3.7 > Added help text and problem matcher > Added pull request template > "Increase duplicate code check threshold " Updating https://github.com/adafruit/Adafruit_CircuitPython_Wiznet5k to 1.10.3 from 1.10.2: > Merge pull request adafruit/Adafruit_CircuitPython_Wiznet5k#38 from bjnhur/master > Redoing adafruit/Adafruit_CircuitPython_Wiznet5k#37 Updating https://github.com/adafruit/Adafruit_CircuitPython_BLE to 8.0.2 from 8.0.1: > Merge pull request adafruit/Adafruit_CircuitPython_BLE#116 from alexwhittemore/master > Moved default branch to main > Added help text and problem matcher > Added pull request template Updating https://github.com/adafruit/Adafruit_CircuitPython_ImageLoad to 0.14.2 from 0.14.1: > Moved default branch to main > Moved CI to Python 3.7 > Added help text and problem matcher > Added pull request template Updating https://github.com/adafruit/Adafruit_CircuitPython_Simple_Text_Display to 1.0.1 from 1.0.0: > Merge pull request adafruit/Adafruit_CircuitPython_Simple_Text_Display#1 from jposada202020/testing_readthedocs
This PR implements parse_headers, which is not available in adafruit_requests anymore.
It also adds a default return status of 500 Internal Server Error, this helped me when debugging an app using Adafruit_CircuitPython_WSGI.
Lastly, we always add a Connection: close header. The server is not ready to handle keep-alive requests, it seems better to make it clear for the client.