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
Support 'Accept-Patch' header in MVC and WebFlux #26759
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
Comments
spring-projects-issues
added
the
status: waiting-for-triage
An issue we've not yet triaged or decided on
label
Apr 4, 2021
igorakkerman
changed the title
MVC: 'Accept-Patch' header should advertise media type and OPTIONS
MVC: 'Accept-Patch' header should advertise media type for PATCH and OPTIONS endpoints
Apr 4, 2021
igorakkerman
changed the title
MVC: 'Accept-Patch' header should advertise media type for PATCH and OPTIONS endpoints
MVC: 'Accept-Patch' header should advertise PATCH media type for PATCH and OPTIONS endpoints
Apr 4, 2021
poutsma
added
type: enhancement
A general enhancement
and removed
status: waiting-for-triage
An issue we've not yet triaged or decided on
labels
Apr 8, 2021
poutsma
changed the title
MVC: 'Accept-Patch' header should advertise PATCH media type for PATCH and OPTIONS endpoints
Support 'Accept-Patch' header in MVC and WebFlux
Apr 8, 2021
poutsma
added a commit
that referenced
this issue
Apr 8, 2021
This commit introduces support in both servlet and webflux for the "Accept-Patch" header in OPTIONS requests, as defined in section 3.1 of RFC 5789. See gh-26759
Thanks for implementing this so quickly. Works for me with the snapshot version, I can remove my own controller methods now. |
Zoran0104
pushed a commit
to Zoran0104/spring-framework
that referenced
this issue
Aug 20, 2021
This commit introduces support in both servlet and webflux for the "Accept-Patch" header in OPTIONS requests, as defined in section 3.1 of RFC 5789. See spring-projectsgh-26759
Zoran0104
pushed a commit
to Zoran0104/spring-framework
that referenced
this issue
Aug 20, 2021
This commit introduces support in both servlet and webflux for the "Accept-Patch" header, which is sent when the client sends unsupported data in PATCH requests. See section 2.2 of RFC 5789. Closes spring-projectsgh-26759
lxbzmy
pushed a commit
to lxbzmy/spring-framework
that referenced
this issue
Mar 26, 2022
This commit introduces support in both servlet and webflux for the "Accept-Patch" header in OPTIONS requests, as defined in section 3.1 of RFC 5789. See spring-projectsgh-26759
lxbzmy
pushed a commit
to lxbzmy/spring-framework
that referenced
this issue
Mar 26, 2022
This commit introduces support in both servlet and webflux for the "Accept-Patch" header, which is sent when the client sends unsupported data in PATCH requests. See section 2.2 of RFC 5789. Closes spring-projectsgh-26759
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
An API providing a
PATCH
endpoint should ensure two things:1 - When the
PATCH
endpoint is sent a body with an unsupported media type, the response should include anAccept-Patch
header, advertising the correct media type. This is specified in RFC5789, Section 2.2:2 - The
OPTIONS
endpoint should advertise the accepted request media types through itsAccept-Patch
header. This is stated in RFC5789, Section 3:It would be great if this would happen by default. Currently, Spring MVC doesn't add the header for either
PATCH
orOPTIONS
, so I had to add this myself:Note that I had to set the
Allow
header values manually, which would only be added correctly if I hadn't implemented the method myself. I might create an own issue for this.The text was updated successfully, but these errors were encountered: