Based on #743. --- see a nice diagram here: https://tools.ietf.org/search/rfc7741#section-5.3