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!! Chris
- hoolio
Cirrostratus
Hi Chris, - 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 } }
- Paul_73795
Nimbostratus
Hi was there any resolution to this issue? - hoolio
Cirrostratus
Can you try replacing \" with ' and retest? - 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. - 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?
- Paul_73795
Nimbostratus
Hi, thanks for the prompt response. - 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. - hoolio
Cirrostratus
Hi Paul, - Paul_73795
Nimbostratus
No worries, will do.
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