[Standards] XEP-0198 stream resumption with too high 'h' parameter

Ruslan N. Marchenko me at ruff.mobi
Tue Feb 14 13:05:24 UTC 2017


On Tue, Feb 14, 2017 at 12:17:10PM +0100, Michal Piotrowski wrote:
> In XEP-0198 I didn't find any information what should happen if clients sends
> too high 'h' parameter. 
> 
> What should be the server response in this case? The safest is probably to
> close the stream with error indicating a policy violation.
> 
> Also what should happen if a client resumes a stream with such too high 'h'
> parameter? This is also not clearly defined in the XEP but I understand that
> the server should return a <failed> response with some reason and allow the
> client to try again or bind the session without resumption. 
> 

Why, there's general case in error handling section:

 Stream management errors SHOULD be considered recoverable;
 however, misuse of stream management MAY result in termination of the
 stream.

So if your implementation can recover from this state - use it,
otherwise just close the stream.

Resume with higher number - again means most probably what is found - is not
correct session to resume, hence <item-not-found/>

--RR


More information about the Standards mailing list