RuleBuilder and TrafficScript comparison

What's the difference between the RuleBuilder and the TrafficScript language?

The full TrafficScript language gives you access to over 200 functions, with the support of a proper programming language - variables, tests, loops and other flow control. So, you can write TrafficScript rules much as you'd write Perl scripts (or BASIC, C, etc).

The RuleBuilder gives you a UI that lets you configure tests, and actions which are executed if one-of or all-of the tests are satisfied. The tests and actions you can use are predefined, and just cover a small subset of the full functionset of TrafficScript. You can use the RuleBuilder much as you'd use the filtering rules in your email client.

Conditions

The RuleBuilder lets you test the following values in its conditions.

Remote IP Address
This is the IP address of the client who is connecting to the ZXTM.
Local IP Address
This is the IP address on the ZXTM which the client connects to.
Remote Port
This is the port on the client machine from which the connection was made.
Note that we do not need a corresponding Local Port option as this is determined by the virtual server to which the connection was made.
Cookie
When supplied with a cookie name this will return the value of that cookie for the http connection. If the cookie does not exist, this will return the empty string.
HTTP Header
When supplied with an HTTP header name this will return the value of that header for the http connection, or the empty string if the header does not exist or has an empty value. The header name is automatically translated into the proper case for the lookup.
HTTP Method
This is the HTTP method used for the connection. Choosing this modifies the expression for the condition to offer the choices GET or POST.
Query String
This is the portion of the request URL after the '?'. This will return the empty string if no query string was provided.
For example, a raw url of http://www.example.com/content?page=44 will be returned as page=44.
URL Path
This returns the %-decoded path in the HTTP request URL, stripping the query string if one was provided. If there is a leading scheme and authority prefix, this is removed as well.
For example, a raw url of http://www.example.com/content?page=44 will be returned as /content.
Raw URL
This is the full URL of the client request provided in the first line of the HTTP request, after the method and before the HTTP version specifier. The raw URL data includes both the path and query string if supplied and is not decoded. It could contain %-escaped characters that can be used to disguise the contents of the URL. Similarly, the file path in the URL could be non-normalized and may contain '.' and '..' references, such as /sales//.././../../etc/passwd.
HTTP Version
This is the version of the HTTP protocol specified in the client request. Choosing this modifies the expression for the condition to offer the choices 1.0 and 1.1.
HTTP Response Body
This is the body data of an HTTP request.
HTTP Response Header
This is the value of a named HTTP header in the HTTP response, or the empty string if the header does not exist or has an empty value. The header name is automatically translated into the proper case for the lookup.
HTTP Response Code
This is the status code from the first line of the HTTP response.
Response Body
Returns the number of bytes of content that you have specified to read from the body of the response.
Warning: you can stall a connection by asking it to read more data than the remote client will provide.

Actions

The RuleBuilder lets you choose one or more of the followng actions when the conditions are met.

Log Error
This logs out the supplied value to the error log with the severity of an error.
Log Warning
This logs out the supplied value to the error log with the severity of a warning.
Log Information
This logs out the supplied value to the error log for your information, not as an error.
Set Persistence
Picks a Session Persistence class to associate with this request.
Set SLM
Picks a Service Level Monitoring class to associate with this request.
HTTP Redirect
Sends a redirect response to the client to the URL supplied.
Drop Connection
This drops the current connection being processed by the rule.
Add Header
This adds a header to the HTTP request. If the header already exists in the response, then this value will be appended to the existing value. The header name is automatically translated to the correct case before it is added.
For example, to add a missing Host header set Header Name = Host and Value = unknown.
Set Header
This sets a header in the HTTP request. If the header already exists, then it will be replaced with this new value. The header name is automatically translated to the correct case before it is added.
Delete Header
This deletes a header in the HTTP request.
Set Request Bandwidth
Picks a Bandwidth class to associate with this request.
Set URL Path
This replaces the URL path portion of the incoming HTTP request. If the replacement value contains a '?', this will also replace the query string; otherwise, any query string is preserved. Any control characters are %-encoded in the replacement value.
For example, setting New Path = /purchase?product=widget will replace the URL path and the query string.
Rewrite URL Path
This performs a regular expression match on the URL path using the supplied pattern and then replaces each matching substring with the supplied replacement. The replacement string may contain $1 .. $9 substitutions, which reference bracketed sub-expressions in the regular expression.
For example, setting Pattern = ^/secure and Replacement = /private will replace each URL path starting with /secure by a URL path starting with /private.
Choose Pool
This selects a pool to send the incoming request to and exits the rule immediately.
Add Response Header
This adds a header to the HTTP response. If the header already exists, then this value will be appended to the existing value. The header name is automatically translated to the correct case before it is added.
For example, setting Header Name = Set-Cookie and Value = "id=12345678; path=/" will add an id cookie with value 12345678.
Set Response Header
This sets a header in the HTTP response. If the header already exists, then it will be replaced with this new value. The header name is automatically translated to the correct case before it is added.
Delete Response Header
This removes the named HTTP header from the HTTP response. The header name is automatically translated to the correct case.
Set Response Cookie
This sets the value of the named cookie in the HTTP response. If the named cookie already exists, this replaces its value.
Delete Response Cookie
This removes the named cookie from the HTTP response
Permit Header
This removes all HTTP headers except those supplied as a space separated list.
Set Response Bandwidth
Picks a Bandwidth class to associate with this response.
Owen Garrett [Zeus Dev Team] 01 July 2005  Permalink  
Leave a comment ...
Your email address will not be displayed.
Your URL will be displayed.
This public messageboard is not a forum for technical support. To report technical support problems, please contact our dedicated Support team using the instructions at the bottom of this page.
Options:
 
(Line breaks become <br />)
(Set cookies for name, email & url)
Download Free ZXTM Desktop Edition

Recent Articles

Other Resources



www.zeus.com