Forum Discussion
L4L7_53191
Sep 14, 2010Nimbostratus
Hi Craig, Matt here. Here's some sample code that logs what you want correctly. Note that I'm using HTTP_REQUEST, since I'm not sure that it matters if you've already got a pool member selected. It may matter, I just don't know.
when HTTP_REQUEST {
if { [HTTP::header exists "NodePre"] }{
set preference_array [split [string tolower [HTTP::header "NodePre"]] ":"]
set Pool_IP [lindex $preference_array 0]
set Pool_Port [lindex $preference_array 1]
log local0. "IP is: $Pool_IP"
log local0. "Port is: $Pool_Port"
log local0. "Sending to: $Pool_IP:$Pool_Port"
node $Pool_IP $Pool_Port
The entry below is just for my dummy tests.
HTTP::respond 200 content 'hello'
}
}
Please post back or contact me if you think this is off base.
-Matt