Add handling of invalid requests to Crossfire spec
mrennie opened this issue · 1 comments
mrennie commented
Reminder to add words to Crossfire spec related to handling of invalid packets. Examples of invalid packets include:
- non-handshake packets received before initial handshake
- packets with invalid formatting
- packets with length != "content-length" header value
- packets with type value != "request"
- requests with seq value < 1
- out-of-sequence requests (I think)
- requests with missing or invalid values for mandatory arguments
Cases of these should return a regular response packet with success=false, and the server must be left in a good state to process subsequent requests.
TBD: It may be desirable to add a detail to the response packet indicating that the failure was due to an invalid request, rather than something like a debugger failure.
mrennie commented
Updated the Response section of the spec.
https://github.com/mrennie/crossfire/wiki/Packets#wiki-response-packets