You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// this server reads the request body then replies with "test"NettyContextcontext = HttpServer
.create(8080)
.newHandler((req, res) -> {
returnreq.receiveContent()
.then(res.sendString(Mono.just("test")).then());
})
.block();
When an HTTP client sends the following request, things work as expected:
curl --data "Test" http://localhost:8080/demo --header "Content-Type: text/plain" --header "Expect:" -vvv
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 8080 (#0)
> POST /demo HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.54.0
> Accept: */*
> Content-Type: text/plain
> Content-Length: 4
>
* upload completely sent off: 4 out of 4 bytes
< HTTP/1.1 200 OK
< transfer-encoding: chunked
<
* Connection #0 to host localhost left intact
test%
Some HTTP clients, when sending a large request body, can send "Expect: 100-continue" request headers (see this article for more on that).
HttpServerHandler now write informational response separately.
In order to fully work the fix correctly defers header sending on subscribe.
This can give precedence to the expect100Continue logic in receiveObject()
HttpServerHandler now write informational response separately.
In order to fully work the fix correctly defers header sending on subscribe.
This can give precedence to the expect100Continue logic in receiveObject()
Consider the following sample server:
When an HTTP client sends the following request, things work as expected:
Some HTTP clients, when sending a large request body, can send
"Expect: 100-continue"
request headers (see this article for more on that).Expected behavior
With the following command:
I expect the server:
HTTP/1.1 100 Continue
HTTP/1.1 200 Continue
and the "test" response bodyActual behavior
Instead, the HTTP client get no reply once it's sent the request body - it's hanged:
On the server side, we can read the following:
Steps to reproduce
These
curl
commands are quite artificial, but you can reproduce this behavior naturally withcurl
, when sending large files like:Reactor Netty version
master branch,
0.7.5.BUILD-SNAPSHOT
JVM version (e.g.
java -version
)OS version (e.g.
uname -a
)The text was updated successfully, but these errors were encountered: