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

Fix request->is(xml) returning true for HTML requests #16585

Merged
merged 5 commits into from Jun 28, 2022
Merged

Commits on Jun 25, 2022

  1. Fix request->is(xml) returning true for HTML requests

    Add html/text as an option for all content-type based detectors so that
    we can differentiate between requests that want HTML but also take xml
    or json from being confused as a non-html type. Assuming browser based
    traffic is a safe default in my opinion.
    
    Fixes #16583
    markstory committed Jun 25, 2022
    Copy the full SHA
    97d3982 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2022

  1. Make content type detection more robust.

    Someone could have a detector that wants to find text/html and the
    previous change would break that.
    markstory committed Jun 26, 2022
    Copy the full SHA
    688b27a View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2022

  1. Fix phpcs

    markstory committed Jun 27, 2022
    Copy the full SHA
    fa5d521 View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2022

  1. Apply suggestions from code review

    Co-authored-by: ADmad <ADmad@users.noreply.github.com>
    markstory and ADmad committed Jun 28, 2022
    Copy the full SHA
    3f1c054 View commit details
    Browse the repository at this point in the history
  2. Use ?? instead of ?:

    markstory committed Jun 28, 2022
    Copy the full SHA
    e7aaba3 View commit details
    Browse the repository at this point in the history