Skip to content

HTTP OPTIONS response for @RequestMapping should contain OPTIONS consistently [SPR-16513] #21056

Closed
@spring-projects-issues

Description

@spring-projects-issues

Graham Cox opened SPR-16513 and commented

I'll preface this by saying I'm not 100% sure this is really a bug. I can't find anything definitive in the HTTP RFCs as to whether an OPTIONS response should include itself as valid, however is seems unintuitive to not be consistent.

If a controller method doesn't specify it handles any specific HTTP methods, the OPTIONS response includes every possible HTTP method.

If the controller methods do specify that they handle specific HTTP methods, the OPTIONS response only includes these.

This means it's possible to make an OPTIONS request and get a successful response that claims that OPTIONS is not a valid method.


Affects: 5.0.3

Issue Links:

Referenced from: commits 6cf6d88

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions