3.6.5.2 Receiving a Polling-POST-Request (Last Handshake Request)

The server MUST validate the Polling-Virtual-Connection-Message, as specified in section 2.2.4.1.3.1.

  1. The Polling-POST-Request Sequence-Number field value on the received message MUST be equal to 0. If the Sequence-Number field value is not equal to 0 it is a protocol error and the Polling connection MUST be closed as specified in section 3.6.4.2.

  2. The Polling-POST-Request MUST contain application data. The server validates the presence of application data by examining the Polling-Content-Length value. The length MUST be greater than the length of the Polling-Virtual-Connection-Message. If not, it is a protocol error, and the virtual connection is closed, as specified in section 3.6.4.1.

  3. The Polling-POST-Request Checksum field value MUST be calculated as specified in section 2.2.4.1.3.1.3 over the length of the application data received. The calculated Checksum value MUST be equal to the Checksum value found in the Polling-POST-Request field.

If any of the preceding validation procedures fail, the virtual polling connection MUST be closed, as specified in section 3.6.4.1.

The server sets ConnectionState to "Established" and sets PostSessionState to "Established".

The application data is handed off to the application layer for further processing.

The server continues as described in section 3.6.5.2.1 to complete the handshake, by sending a Polling-POST-Response with a status code of "200".