Ben_Newport_102
Jun 04, 2008Nimbostratus
HTTP::header custom Headers
I have the following iRule:
when HTTP_REQUEST {
log local0. "==========================="
log local0. "<<< HTTP Headers >>>"
set names [HTTP::header names]
foreach name $names {
log local0. "$name"
}
set u [string tolower [HTTP::header "HTTP_SAMACCOUNTNAME"]]
set h [string tolower [HTTP::header "Host"]]
log local0. "Username:$u"
log local0. "Host:$h"
}
Output to /var/log/ltm
Jun 4 13:58:54 tmm tmm[730]: Rule https_aesc_stage : ===========================
Jun 4 13:58:54 tmm tmm[730]: Rule https_aesc_stage : <<< HTTP Headers >>>
Jun 4 13:58:54 tmm tmm[730]: Rule https_aesc_stage : Accept
Jun 4 13:58:54 tmm tmm[730]: Rule https_aesc_stage : Accept-Language
Jun 4 13:58:54 tmm tmm[730]: Rule https_aesc_stage : UA-CPU
Jun 4 13:58:54 tmm tmm[730]: Rule https_aesc_stage : Accept-Encoding
Jun 4 13:58:54 tmm tmm[730]: Rule https_aesc_stage : User-Agent
Jun 4 13:58:54 tmm tmm[730]: Rule https_aesc_stage : Host
Jun 4 13:58:54 tmm tmm[730]: Rule https_aesc_stage : Cookie
Jun 4 13:58:54 tmm tmm[730]: Rule https_aesc_stage : Connection
Jun 4 13:58:54 tmm tmm[730]: Rule https_aesc_stage : Cache-Control
Jun 4 13:58:54 tmm tmm[730]: Rule https_aesc_stage : Username:
Jun 4 13:58:54 tmm tmm[730]: Rule https_aesc_stage : Host: s-aesc.ustest.aegontest.com
But when I go to an asp page that displays debug info including the HTTP Headers all our custom headers are coming through:
HTTP_CACHE_CONTROL = no-cache
HTTP_CONNECTION = Keep-Alive
HTTP_ACCEPT = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, application/xaml+xml, application/vnd.ms-xpsdocument, application/x-ms-xbap, application/x-ms-application, */*
HTTP_ACCEPT_ENCODING = gzip, deflate
HTTP_ACCEPT_LANGUAGE = en-us
HTTP_COOKIE = ObSSOCookie=UhV705ugxxiOXjM6UU7OGApXmD2cAaVrtNpt2LHV%2BsGs3wLVy%2Ffm6YqkD8Ky29K%2BjJey7%2F7hkIgMJRq1FBsz6QwucZ88JdVrEGz7KNVC9mhIAtaYWB9i9flUQkpLmNzBupn90l2wo5AAq7EFf6aBpoCC%2BO6KwreCGp5I05hcOb5nQoLCW5S8hp0UnAeztnTg9Ew4L0BAo%2BESpMwpKJcWQzjeZIJHpwPQzfnbuLEwe3Q10rnzAv%2Fir782r0203zvJv71sZKLGPa0A4Gi4z7%2BqAQbCSXlc8mhaIqwMZIf4%2FB09cLVTPomNT0Lp0HhGrDIPEeNplYFUh3OLb%2FlRExsCTV7g%2F5IJXPq4eYHp8xcs0IZ%2BvKoJTBUjNm5UycRN49CJtdz1xmW1IyApXU56Cag3iWF5rj0cPE5BCIrtUDEidqkFRLIYaAKI1EYCmcw1Vjcrt%2BdYsZ68EUCEkSy88psC1plxY0XGCqciTGgB%2B5svOks%3D
HTTP_HOST = s-aesc.ustest.aegontest.com
HTTP_USER_AGENT = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)
HTTP_UA_CPU = x86
HTTP_LOGGEDOUTCONTINUEFLAG = true
HTTP_OBLIXACTIVE = true
HTTP_EMPLOYEEID =
HTTP_AEGONSCRATCH10 =
HTTP_AESCID =
HTTP_SAMACCOUNTNAME = bnewport
HTTP_MAIL = bnewport@aegonusa.com
I would like to be able to do PILOT groups for new websites while keeping the old site available for normal users. I though I could do this at the iRule level and just pull the SAMACCOUNTNAME and if it was in a list of PILOT users direct them to a different pool, but it doesn't look like we are able to pull this information. Was this corrected in a later version of BIG IP we are still running 9.1.3 on this system?
I have tried it with HTTP_SAMACCOUNTNAME and just SAMACCOUNTNAME neither works.