From b56a5a1d60715ae115723c11c27ff7e032a3c4a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 12 Sep 2018 16:16:29 +0200 Subject: Do not send a 101 after a final response in switch_protocol --- doc/src/guide/migrating_from_2.4.asciidoc | 5 +++++ doc/src/manual/cowboy_stream.asciidoc | 3 +++ 2 files changed, 8 insertions(+) (limited to 'doc/src') diff --git a/doc/src/guide/migrating_from_2.4.asciidoc b/doc/src/guide/migrating_from_2.4.asciidoc index 4ffb5b9..edf7d5b 100644 --- a/doc/src/guide/migrating_from_2.4.asciidoc +++ b/doc/src/guide/migrating_from_2.4.asciidoc @@ -81,6 +81,11 @@ also been worked on. * Improve the validation of HTTP/1.1 absolute-form requests. +* When the `switch_protocol` is used after a response was + sent, Cowboy will no longer attempt to send the 101 informational + response for the protocol upgrade. This caused a crash of the + connection previously. + * Errors that occur when a callback returned by `content_types_provided` does not exist have been improved. diff --git a/doc/src/manual/cowboy_stream.asciidoc b/doc/src/manual/cowboy_stream.asciidoc index 763cbd5..4e6e34a 100644 --- a/doc/src/manual/cowboy_stream.asciidoc +++ b/doc/src/manual/cowboy_stream.asciidoc @@ -205,6 +205,9 @@ Contains the headers that will be sent in the 101 response, along with the module implementing the protocol we are switching to and its initial state. +Note that the 101 informational response will not be sent +after a final response. + === stop Stop the stream. -- cgit v1.2.3