Enhance handling of text response - support more text minetypes and subtypes.#1023
Closed
cobnett3 wants to merge 1 commit into
Closed
Enhance handling of text response - support more text minetypes and subtypes.#1023cobnett3 wants to merge 1 commit into
cobnett3 wants to merge 1 commit into
Conversation
2d87d00 to
7ac1c45
Compare
|
Pease make the same pull request on Zappa2, which is a branch of this repo. Since This repo has been deprecated I will take up maintenance. |
Author
|
Considering the latest update regarding the maintainers of this project, is this still valid to keep this PR here? |
monkut
added a commit
that referenced
this pull request
Aug 12, 2022
♻️ define "DEFAULT_TEXT_MIMETYPES" and move to utilities.py
Collaborator
|
Integrating partially into: closing. |
monkut
added a commit
that referenced
this pull request
Nov 11, 2022
…ata is binary (#1155) * 🔧 migrate #971 to lastest master * 🎨 run black/isort * ♻️ refactor to allow for other binary ignore types based on mimetype. (currently openapi schema can't be passed as text. * 🎨 run black/fix flake8 * 🔧 add EXCEPTION_HANDLER setting * 🐛 fix zappa_returndict["body"] assignment * 📝 add temp debug info * 🔥 delete unnecessary print statements * ♻️ Update comments and minor refactor for clarity * ♻️ refactor for ease of testing and clarity * 🎨 fix flake8 * ✨ add `additional_text_mimetypes` setting ✅ add testcases for additional_text_mimetypes handling * 🔧 Expand default text mimetypes mentioned in #1023 ♻️ define "DEFAULT_TEXT_MIMETYPES" and move to utilities.py * 🎨 run black/isort * 🎨 run black/isort * 🎨 remove unnecesasry comment (black now reformats code) 🎨 change commented lines to docstring for test app
Ian288
pushed a commit
to tackle-io/Zappa
that referenced
this pull request
Jul 11, 2023
… if data is binary (zappa#1155) * 🔧 migrate zappa#971 to lastest master * 🎨 run black/isort * ♻️ refactor to allow for other binary ignore types based on mimetype. (currently openapi schema can't be passed as text. * 🎨 run black/fix flake8 * 🔧 add EXCEPTION_HANDLER setting * 🐛 fix zappa_returndict["body"] assignment * 📝 add temp debug info * 🔥 delete unnecessary print statements * ♻️ Update comments and minor refactor for clarity * ♻️ refactor for ease of testing and clarity * 🎨 fix flake8 * ✨ add `additional_text_mimetypes` setting ✅ add testcases for additional_text_mimetypes handling * 🔧 Expand default text mimetypes mentioned in zappa#1023 ♻️ define "DEFAULT_TEXT_MIMETYPES" and move to utilities.py * 🎨 run black/isort * 🎨 run black/isort * 🎨 remove unnecesasry comment (black now reformats code) 🎨 change commented lines to docstring for test app
monkut
added a commit
that referenced
this pull request
May 20, 2025
* 🔧 migrate #971 to lastest master * 🎨 run black/isort * ♻️ refactor to allow for other binary ignore types based on mimetype. (currently openapi schema can't be passed as text. * 🎨 run black/fix flake8 * 🔧 add EXCEPTION_HANDLER setting * 🐛 fix zappa_returndict["body"] assignment * 📝 add temp debug info * 🔥 delete unnecessary print statements * ♻️ Update comments and minor refactor for clarity * ♻️ refactor for ease of testing and clarity * 🎨 fix flake8 * ✨ add `additional_text_mimetypes` setting ✅ add testcases for additional_text_mimetypes handling * 🔧 Expand default text mimetypes mentioned in #1023 ♻️ define "DEFAULT_TEXT_MIMETYPES" and move to utilities.py * 🎨 run black/isort * 🎨 run black/isort * feat: implement handler for event with format version 2.0 * refactor: getting processed response body from new method * fix: lint error * chore: move variable initialization before initial if condition * refactor: abstract implementations to two processing methods * fix: determine payload version based on value in the event itself * fixed lint --------- Co-authored-by: monkut <shane.cousins@gmail.com> Co-authored-by: Rehan Hawari <rehan.hawari10@gmail.com>
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
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.
Description
Currently, minetypes starts with "text/" and "application/json" are handled as text responses from the WSGI server.
However, there are more minetypes that should be returned as text, not binary.
This PR adds support for the following minetypes to be treated as text.
GitHub Issues
#1021