Kim_Scarborough
Dec 01, 2005Nimbostratus
iRule "domain" truncating
I've been using the iRule "domain" command in a variety of iRules. I've been having problems with it, and I finally figured out that it is truncating the last letter, for some reason. I created a special, simplified iRule to illustrate the problem:
when HTTP_REQUEST {
if { [HTTP::host] ends_with "example.com" } {
HTTP::respond 403 X-Domain [ domain [HTTP::host] 2 ]
}
}
Here's an HTTP session transcript for the VIP with that iRule:
GET /poop HTTP/1.1
Host: www.example.com
HTTP/1.0 403 Forbidden
X-Domain: example.co
Server: BIG-IP
Connection: Keep-Alive
Content-Type: text/html
Content-Length: 0
Shouldn't "X-Domain" be returning "example.com", not "example.co"? Or is there something I've missed here?