Forum Discussion
Brian_69413
Nimbostratus
Nov 12, 2007Conversion error for b64encode
I am encrypting username and password values from the [HTTP::payload] of an HTTP_RESPONSE and decrypting those same values on an HTTP_REQUEST. The values encrypt fine and I can log them as such. The...
Luke_Lehman
Employee
Jul 27, 2009Hey all,
I'm experiencing the same b64decode error " - conversion error invoked from within "b64decode [lindex $::banner_prg_png_class 0]"
I've encoded a png image as directed by this post http://devcentral.f5.com/wiki/default.aspx/iRules/LTMMaintenancePage.html
I've created the file and removed all of the 'returns', created the class, and associated the iRule with the VIP.
This code fails:
when HTTP_REQUEST {
log local0.info "Rule initiated"
HTTP::respond 200 content [b64decode [lindex $::banner_png_class 0]] "Content-Type" "image/png"
log local0.info "Response Successful"
}
When I replace the "[lindex $::banner_png_class 0]" with the actual b64 text - it works just fine.
What I'm trying to do in the end is to have a 200 respond with a multilined html response with several images, but I can't get past this step...
Thanks in advance.
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
