iRules containing double-byte characters
when using the Configuration utility to create an iRule containing Chinese characters in a custom HTTP response, an error message that appears similar to the following example is displayed by the Configuration utility and logged to the /var/log/ltm file:
Dec 17 17:50:56 local/ltmtest err mcpd[5757]: 01070151:3: Rule [dss] error: line 1: [braces are required around the expression] [when HTTP_REQUEST { sets the timer to return client to host URL set stime 10 Use the Host header value for the responses if it's set. If not, use the VIP address. if {[string length [HTTP::host]]}{ set host [HTTP::host] } else { set host [IP::local_addr] } Check if the URI is /maintenance switch [HTTP::uri] { "/maintenance" { Send an HTTP 200 response with a Javascript meta-refresh pointing to the host using a refresh time HTTP::respond 200 content \ " "缂佸瓨濮\
Sorry! This site is down for maintenance.
" "Content-Type" "text/html" return } } If the pool_testLB is down, redirect to the maintenance page if { [active_members web-pool] < 1 } { HTTP::redirect "http://$host/maintenance"