Skip to content

Commit 92f3176

Browse files
committed
rfc42: note some protocol invariants
Problem: it is not clear which exec responses are required when the server terminates the stream with ENODATA (success). Make it clear that certain certain responses must be received in that case, and it is a protocol error if they are missing.
1 parent 3b4669d commit 92f3176

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

spec_42.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,12 @@ Several response types are distinguished by the type key:
182182
.. object:: exec error response
183183

184184
The :program:`exec` response stream SHALL be terminated by an error
185-
response per RFC 6, with ENODATA (61) indicating success.
185+
response per RFC 6, with ENODATA (61) indicating success. The server MUST
186+
NOT terminate the stream with ENODATA without first returning the
187+
:program:`exec started` response, :program:`exec finished` response, and
188+
:program:`exec output` responses with the EOF flag set for each open channel.
189+
The client MAY consider it a protocol error if one of those responses is
190+
missing and an ENODATA response is received.
186191

187192
Failure of the remote command SHALL be indicated in finished response
188193
and SHALL NOT result in an error response. Other errors, such as an

0 commit comments

Comments
 (0)