0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Make stream_error early_error reasons consistent

Now both HTTP/1.1 and HTTP/2 follow the documented format.
HTTP/1.1 was including an extra element containing the
StreamID before, which was unnecessary because it is also
given as argument to the callback.

HTTP/2 early_error will now include headers in its PartialReq.
This commit is contained in:
Loïc Hoguin 2019-10-03 15:42:58 +02:00
parent 57badc9082
commit 1ba48c58b1
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764
4 changed files with 41 additions and 13 deletions

View file

@ -314,7 +314,7 @@ do_early_error(Config) ->
ref := _,
pid := From,
streamid := 1,
reason := {stream_error, 1, protocol_error, _},
reason := {stream_error, protocol_error, _},
partial_req := #{},
resp_status := 400,
resp_headers := ExpectedRespHeaders,