<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Before I send my main request and process the response through create_request and process_header (and filter) callbacks, I need to have a short handshake with the upstream servers. It consists of a send() and a recv() from the upstream module. How to implement this?<div><br></div><div>Would the following sequence work?</div><div>States: H = do-handshake (initial state), R = do-request</div><div>1 In state H, send handshake req first through create_request()</div><div>2 In process_header() in state == H</div><div> 2.1 call 'create_request' again with state set to R, so main request gets created</div><div> 2.2 call 'ngx_http_upstream_send_request' manually to restart the req-response cycle</div><div>3 Because of 2.2 we get a process_header() call in state R</div><div><br></div><div>Regards,</div><div>Reetesh</div> </div></body>
</html>