Skip to content

CORS detection for reactive stack on tomcat/netty is broken [SPR-17396] #21929

Closed
@spring-projects-issues

Description

@spring-projects-issues

Johannes Edmeier opened SPR-17396 and commented

The CorsUtils queries the presence of the Origin and Access-Control-Request-Method with a simple non null check. But when using the reactive stack the TomcatHeadersAdapter#get() and the NettyHeadersAdapter#get() returns an empty list (instead of null) when the requested header is not present.
The effect of this is, that OPTIONS requests aren't handled with the (correct) annotated handler method but are incorrectly handled as preflight requests (which they aren't)


Affects: 5.1.1

Issue Links:

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions