Forum Discussion
Craig_Jackson_1
Nimbostratus
May 22, 2006Responding with binary image
I'm trying to implement a "goaway" capability. It seems like it should be possible to implement it totally in the Bigip. Basically, I need to respond to all URLs with an HTML page saying "come back later". But they want a logo on the page.
I've got an iRule that looks like this:
when HTTP_REQUEST {
set content [b64decode "base 64 encoded PNG"]
HTTP::Respond 200 content $content "Content-Type" "image/png"
}
But it only sends the PNG up until the first null character, which is about 7 bytes. I also tried to add a content-length header using [string length $content], and also got a value of 7.
Is there any way to deal with binary data like this in iRules? HTTP::Payload replace perhaps?
Craig Jackson
Craig.Jackson@thomson.com
4 Replies
No RepliesBe the first to reply
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