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

Return 415 rather than 400 on Urlencoded Content-Type mismatch #3334

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mpalmer
Copy link

@mpalmer mpalmer commented Apr 15, 2024

PR Type

Bug Fix

PR Checklist

  • Tests for the changes have been added / updated.
  • [N/A] Documentation comments have been added / updated.
  • A changelog entry has been made for the appropriate packages.
  • Format code with the latest stable rustfmt.
  • (Team) Label with affected crates and semver status.

Overview

When the Content-Type of a request that was parsed by UrlEncoded wasn't appropriate, a generic 400 response was returned. Given that there is a dedicated response code for this (415), I thought it better to return that instead, so now it does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant