Craig_Jackson_1
May 22, 2006Nimbostratus
Responding 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