Create superior policies to 255 characters

3:58 PM
Create superior policies to 255 characters -

AppExpert policies allow you to invoke the powerful layer 7 manipulation. But many policies will result in an error:

ERROR: higher chain length maximum. maximum length is 255 bytes.

To overcome this limitation of entry, you can insert a separation sequence "+" all 255 characters. And when it comes to very long strings of text, making it difficult to pinpoint the many breakpoints, you can easily automate the process using the shell and a simple Perl substitution.

Example # 1

In this example, I'll take a long input string to add a sequence of separation at the appropriate interval. In this case, the interval was reduced from 255 to 10 for illustrative purposes:
> Shell
# echo 'the long chain that you must separate single quotes' | perl -p 's / (. {10}) / $ 1 "+" / g'
"+" s Tring long you "+" need to "+" parate enc "+" -e losed in s "+" ingle quot're "+"

Working with HTML:

in the following example, I will use the transponder module for a return HTML page with dynamic data AppExpert policies; I'll include in the page at a later date. For the base page, I'll use the next model, which is 285 characters:





Title Goes Here


This is my web page



But unless the quotation marks in the HTML code are escaped with a backslash character, you will have the following error message syntax:

ERROR: syntax error expression

Fortunately, I can leverage the same procedure to escape quotes and insert separators using additional Perl first substitution:

| perl -p -e 's / ["] / \ "/ g' | (. {255}) perl -p 's / / $ 1 +" / g -e "
example 2:
> shell

# echo '

Title Goes Here

This my page is "+" web

#

exit

> add responder RespondWith test action q { " Title Goes Here

This is my page "+" web

"} -bypassSafetyCheck YES

Done

References:

How to set up a web page Maintenance using the answering function of the NetScaler Appliance

Serve rich HTML error pages NetScaler

Upload HTML page specified in the device NetScaler

Previous
Next Post »
0 Komentar