curl irule behavior
I have an irule that is as follows:
when HTTP_REQUEST { set var1 [getfield [HTTP::uri] "/" 2 ] log local0. "$var1" HTTP::header replace "Host" "https://$var1.host.domain.com:9090" log local0. "[HTTP::host]" HTTP::uri [substr [HTTP::uri] [expr ([string length $var1 ] + 1 )]] log local0. "Host and URI modified to: [HTTP::host][HTTP::uri]" }
In the log this appears to be working, : https://var1.host.domain.com:
With the following curl command: curl -k -v -H 'Authorization:HCP ' https://host.domain.com:9090/path1/var1/path2/path3
In Curl output I'm getting the following:
Host: host.domain.com ( would expect to see var1.host.domain.com ) < HTTP/1.1 503 Service Unavailable * Connection 0 to host host.domain.com left intact