Bhargav_9588
Feb 15, 2010Nimbostratus
getfield Parsing error
Hello,
I am trying to add an iRule to insert an http header value by stripping out domain from REMOTE_USER header. The following is the iRule I am trying to use:
when HTTP_REQUEST {
set login_user [HTTP::header remote_user ]
if { $login_user contains "\" } {
set ldap_user [getfield $login_user "\" 2]
HTTP::header replace SAPUserID $ldap_user
}
}
But it is throwing the following parsing error while saving:
01070151:3: Rule [insert.header.rule] error:
line 4: [parse error: missing "] ["\" 2]
HTTP::header replace SAPUserID $ldap_user
Any help is appreciated. Thanks in advance.