Skip to content
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

🐛 Check Content-Type request header before assuming JSON #2118

Merged
merged 12 commits into from Jun 7, 2021

Commits on Apr 10, 2021

  1. Check Content-Type before assuming JSON

    Don't try to convert to JSON unless Content-Type == application/json.
    Patrick Wang authored and patrickkwang committed Apr 10, 2021
    Copy the full SHA
    e46bce3 View commit details
    Browse the repository at this point in the history
  2. Remove now-unneccessary exception handling

    Patrick Wang authored and patrickkwang committed Apr 10, 2021
    Copy the full SHA
    df4fdf0 View commit details
    Browse the repository at this point in the history
  3. Fix broken-body test

    Patrick Wang authored and patrickkwang committed Apr 10, 2021
    Copy the full SHA
    4e8605e View commit details
    Browse the repository at this point in the history
  4. Assume "Content-Type": "application/octet-stream"

    Per RFC 7231, the "Content-Type" header is not strictly required, and if it is not present, "application/octet-stream" should be assumed.
    Patrick Wang authored and patrickkwang committed Apr 10, 2021
    Copy the full SHA
    c7191f5 View commit details
    Browse the repository at this point in the history
  5. Explicitly specify Content-Type in gzip test

    Patrick Wang authored and patrickkwang committed Apr 10, 2021
    Copy the full SHA
    c169258 View commit details
    Browse the repository at this point in the history
  6. Interpret as JSON any mimetype ending with "json"

    Patrick Wang authored and patrickkwang committed Apr 10, 2021
    Copy the full SHA
    d644c30 View commit details
    Browse the repository at this point in the history
  7. Generalize media type parsing to handle parameters

    Patrick Wang authored and patrickkwang committed Apr 10, 2021
    Copy the full SHA
    6ecfba9 View commit details
    Browse the repository at this point in the history
  8. Copy the full SHA
    d752efd View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2021

  1. Copy the full SHA
    f80305d View commit details
    Browse the repository at this point in the history
  2. ♻️ Re-implement JSON content-type parsing with Python's standard libr…

    …ary email module
    
    to cover corner cases
    tiangolo committed Jun 7, 2021
    Copy the full SHA
    344ae3f View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    29257d0 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    5729e8a View commit details
    Browse the repository at this point in the history