Skip to content

Override Servlet 6.1's doPatch() method in FrameworkServlet #36247

@hyunsu15

Description

@hyunsu15

I have a question and suggestion.

HttpServlet supports the patch method since Servlet 6.1, and Spring 7's baseline is Servlet 6.1.

So, my suggestion is to add explicit support for PATCH in FrameworkServlet.

private static final Set<String> HTTP_SERVLET_METHODS =
			Set.of("DELETE", "HEAD", "GET", "OPTIONS", "POST", "PUT", "TRACE","PATCH");

// ...

	@Override
	protected final void doPatch(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		processRequest(request, response);
	}

I know the history and that the current code works well, but I think that the suggested code is more consistent since HttpServlet now supports the PATCH method.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions