3.5.4.1.2 Establishing POST Session with Proxy
The client sets the ProxyConnection to TRUE.
The client MUST construct the Polling-POST-Request-URI as the Polling-POST-Request-Absolute-URI (see section 2.2.4.1.1), with the ServerHost as the HTTP-URL target host name.
The client MUST construct a Polling-POST-Request with required headers, as specified in section 2.2.4.1.
The client MUST construct the Polling-Virtual-Connection-Message as specified in section 2.2.4.1.3.1. This message is embedded within the Polling-Request-Entity-Body.
The client MUST construct the Polling-Virtual-Connection-Message with the ServerHost as Relay-Server-Name and VirtualConnectionGUID as Virtual-Connection-GUID.
If the PostSessionState is ‘Probing’, the Sequence-Number and Checksum MUST both be set to 0. The Polling-Content-Length header MUST contain the length of the Polling-Virtual-Connection-Message.
If the PostSessionState is ‘Probed’, Sequence-Number is set to 0. The Checksum MUST be calculated (see section 2.2.4.1.3.1.3) over the length of the application data that is to be sent.
The Polling-Content-Length header MUST contain the length of the Polling-Request-Entity-Body.
If the ProxyAuthRequired is set, the client MUST add additional proxy authentication headers to the request.
The client MUST establish a TCP connection to the server identified with ProxyServerHostName and ProxyServerPort and send the Polling-POST-Request.