I have a very simple application with WebFlux.

package com.example.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import reactor.core.publisher.Mono;

@RestController
@SpringBootApplication
public class DemoNettyApplication {

    public static void main(String[] args) {
        SpringApplication.run(DemoNettyApplication.class, args);
    }

    @GetMapping("/hello")
    public Mono<String> test() {
        return Mono.<String>just("hello");
    }
}

When I test the request with Chrome, I found that the response lost the Connect header. There are only 2 headers in my response header.

HTTP/1.1 200 OK
Content-Type: text/html;charset=UTF-8
Content-Length: 5

When I test the same application with Undertow as the server, there are 4 headers.

HTTP/1.1 200 OK
Connection: keep-alive
Content-Type: text/html;charset=UTF-8
Content-Length: 5
Date: Fri, 27 Dec 2019 12:18:57 GMT

It looks like it lost the Connection header. The Connection header is very important.

Why is the Connection header present in the response when using Undertow but not when using Netty?

Comment From: rstoyanchev

I suspect this is related to the lack of support for HTTP 1.0 in Reactor netty, see https://github.com/reactor/reactor-netty/issues/21. In 1.0 "Connection: keep-alive" must be set for persistent connections, but in 1.1 it is assumed by default.

In any case this isn't something related to WebFlux itself. If you have a specific issue please discuss under the Reactor Netty ticket.