Forum Discussion
Chris_Chaloux_1
Nimbostratus
Jul 29, 2009iRule w/classes corrupting class files.
Hi all!
I have an interesting problem that hopefully has a "quick" fix that I have been unable to find.
I am currently using the LTM Maintanece iRule that has been out here for quite some time. It works perfectly but unreliably for how I have it configured.
I am running LTM 9.4.6.
Each time the iRule is invoked, it calls the class files to load the html, and image classes. In the HTML class, it appears that where I have an "/" to escape a qutation mark ' " ' the LTM is modifying the class file and is adding another slash in on each request.
This is an example line of a fresh html class file:
And here is what it looks like after it is called from the iRule:
Has anyone seen this or know how I could troubleshoot what's going on? Thanks!! Chris14 Replies
- hoolio
Cirrostratus
Hi Chris,
Can you post a copy of the rule you're using to reference the class? Is it an external class or a string class?
Aaron - Chris_Chaloux_1
Nimbostratus
Here is the existing rule:when HTTP_REQUEST { set maint_prefix "" if { [HTTP::uri] starts_with "$maint_prefix" } { set uri [string map [list $maint_prefix ""] [HTTP::uri]] set uri [HTTP::uri] switch -- $uri { "" { log local0. "Request for $maint_prefix. Redirecting to $maint_prefix/" HTTP::redirect "$maint_prefix/index.html" } "/" - "/index.html" { log local0. "Request for index. Responding with content: [lindex $::maint_index_html_class 0]" HTTP::respond 200 content [lindex $::maint_index_html_class 0] "Content-Type" "text/html" } "/logo.jpg" { log local0. "Request for logo.png. Responding with binary content" HTTP::respond 200 content [b64decode [lindex $::oos_mmcom_logo_class 0]] "Content-Type" "image/png" } "/bluebar.jpg" { log local0. "Request for bluebar.png. Responding with binary content" HTTP::respond 200 content [b64decode [lindex $::oos_oursite_bluebar_class 0]] "Content-Type" "image/png" } "/oos_top.jpg" { log local0. "Request for bluebar.png. Responding with binary content" HTTP::respond 200 content [b64decode [lindex $::oos_info_logo_class 0]] "Content-Type" "image/png" } default { log local0. "Unrecognized request to URI: [HTTP::uri]" HTTP::redirect "http://www.oursite.com" } } return } }
Thanks, Aaron!! - Paul_73795
Nimbostratus
Hi was there any resolution to this issue?
I am seeing similar results with the addition of extra '\' when I am commenting out '"' as described above. - hoolio
Cirrostratus
Can you try replacing \" with ' and retest?
Aaron - hoolio
Cirrostratus
If that doesn't work for some reason, you could try URL encoding the HTML content in the datagroup and then use URI::decode in the iRule before sending the response with HTTP::respond.
Aaron - Colin_Walker_12Historic F5 AccountHmm, returning the info from the class via an lindex certainly shouldn't be modifying the class. Is there any other iRule that might be touching the class to update it?
Colin - Paul_73795
Nimbostratus
Hi, thanks for the prompt response.
Aaron, I tried with the ' replacing the \ and encountered an invalid format error when trying to reload the configuration files. I haven't tried to URL encode the HTML yet, but will have a look at it.
Colin, the issue occurs when I edit the iRule associated with the class.
Would there be any issue with creating a number of classes for separate outage pages that relate to different load balanced services? We have a number of services running through our 6900 and they require separate outage pages that reflect the look and feel of that particular service.
Cheers
Paul - Paul_73795
Nimbostratus
I have noticed that the '\' are being added every time the configuration is reloaded, so if I type 'b load' on the command line an extra '/' is added.
This eventually caused a class creation error when loading the configuration because the class kept having '/' appended to it.
BIGpipe class creation error:
01070712:3: Caught configuration exception (0), Max string size exceeded during update of attribute:data type:class_string_item max:65520 received:65591 - EdbCompositeObj.cpp, line 84. - hoolio
Cirrostratus
Hi Paul,
This looks like a bug. I suggest opening a case with F5 Support to get help investigating the issue.
Aaron - Paul_73795
Nimbostratus
No worries, will do.
Cheers
Paul
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
