Hi Sergey, Thanks for your reply. I tried with and without newlines, but as Sergey Kandaurov noted, the variable was empty in both cases,,so the variable not being set before handshake is the likely cause. Dave Posted at Nginx Forum: https://forum.nginx.org/read.php?2,291902,291909#msg-291909