-
Notifications
You must be signed in to change notification settings - Fork 31
301/302 Redirects, FormData files, Cookies, Token authentication #67
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
FoamyGuy
merged 25 commits into
adafruit:main
from
michalpokusa:redirect-301-302-token-form-files-cookies
Sep 8, 2023
Merged
301/302 Redirects, FormData files, Cookies, Token authentication #67
FoamyGuy
merged 25 commits into
adafruit:main
from
michalpokusa:redirect-301-302-token-form-files-cookies
Sep 8, 2023
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
temp to docs
…quest header part
8edcd1b
to
8c16b27
Compare
6858cef
to
4ec080e
Compare
FoamyGuy
approved these changes
Sep 2, 2023
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.
This looks good to me.
I tested as much of the new features and fixes as I could on a combination of Metro S3, and Feather S3 TFT both on 9.0.0 latest release from S3.
Thank you for all of the improvements!
adafruit-adabot
added a commit
to adafruit/Adafruit_CircuitPython_Bundle
that referenced
this pull request
Sep 8, 2023
Updating https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI to 6.0.1 from 6.0.0: > Merge pull request adafruit/Adafruit_CircuitPython_ESP32SPI#181 from dhalbert/remove-wsgiserver-completely Updating https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display to 3.12.1 from 3.12.0: > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#115 from kattni/eyespi-beret Updating https://github.com/adafruit/Adafruit_CircuitPython_HID to 5.4.0 from 5.3.6: > Merge pull request adafruit/Adafruit_CircuitPython_HID#116 from michalpokusa/layout-write-delay Updating https://github.com/adafruit/Adafruit_CircuitPython_HTTPServer to 4.4.0 from 4.3.0: > Merge pull request adafruit/Adafruit_CircuitPython_HTTPServer#67 from michalpokusa/redirect-301-302-token-form-files-cookies Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA: > Updated download stats for the libraries
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Despite multiple new features, the overall API itself didn't change much. I believe theese changes, if it comes to that, should be released as 4.x.0 and not 5.0.0.
⭐ Added:
Token
authentication class, works the same way asBearer
, but with "Token ..." prefixMOVED_PERMANENTLY_301
andFOUND_302
Status
objectsHeaders
got new methods:get_directive()
andget_parameter()
,add
andset
Request.cookies
for retrieving andcookies
parameter for setting in allResponse
-like classesrequest.form_data.files
that uses newFiles
andFile
classes for representing files uploaded usingmultipart/form-data
🪛Fixes:
tuple
as possibleRoute.methods
parameter type, changed typing fromUnion
toIterator
🛠️ Updated/Changed:
Redirect
got newpreserve_method
parameter, which allows it to switch between301
,302
,307
and308
Redirect
got newstatus
parameter, which allow for manual status code settingRedirect
e.g.
192.168.0.103 -- "GET /index.html" 242 -- "200 OK" 154 -- 182ms
FormData
QueryParams
,FormData
andHeaders
, especially inget()
andget_list()
Server.serve_forever
now acceptspoll_interval
parameter which adds delay between calling.poll()
FormData.__init__()
for edge cases, e.g. when there is noContent-Type
header inPOST
requestRequest.json()
can now be accessed inPUT
,PATCH
andDELETE
requests🏗️ Refactor:
_IFieldStorage
tointerfaces.py
, also added_IXSSSafeFieldStorage
version of interface that enables encoding HTML entitiesQueryParams
andFormData
implement_IXSSSafeFieldStorage
Headers
now implements_IFieldStorage
and does not store original case of header names, functionally it is the samemultipart/form-data
form dataI hope I included everything.