Be emphatic about remote peers making mistakes. (#65)

Motivation:

Receiving a CONTINUATION frame at the wrong stage of a connection is
a PROTOCOL_ERROR, but out of an abundance of caution we were categorising
it as an INTERNAL_ERROR. We should be more confident about our error
categories.

Modifications:

- Changed INTERNAL_ERROR to PROTOCOL_ERROR.
- Added a test for this error case.

Result:

More confidence, more style, more pizazz.
This commit is contained in:
Cory Benfield authored and GitHub committed 2019-03-15 14:37:17 +00:00
1 parent 9e07639b44
commit d9f1131749
4 files changed
+25 -1

No files matched your search

+2
View File
@@ -201,4 +201,6 @@ internal enum InternalError: Error {
case codecError(code: HTTP2ErrorCode)
}
extension InternalError: Hashable { }