Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-17396

CORS detection for reactive stack on tomcat/netty is broken

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 5.1.1
    • Fix Version/s: 5.1.2
    • Component/s: Reactive, Web
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      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)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bclozel Brian Clozel
              Reporter:
              joshi Johannes Edmeier
              Last updater:
              Spring Issuemaster
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 37 weeks ago