Forum Discussion
Jon_Strabala_46
Nimbostratus
Feb 03, 2010How to use HTTP::respond to send a 1x1 gif
Hello,
I am trying to write a simple iRule to that uses HTTP::respond (from HTTP_REQUEST) to send a 1x1 gif back to the client on any request.
I build a 1x1 gif (44 bytes) bu...
Jon_Strabala_46
Nimbostratus
Feb 03, 2010Thanks Aron, this worked great
when RULE_INIT {
prepare a (44 byte transparent) gif for short-circuit injections
set ::base641x1tgif "R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOwA="
set ::i1x1tgif [b64decode [lindex $::base641x1tgif 0]]
}
when HTTP_REQUEST {
HTTP::respond 200 content $::i1x1tgif noserver "Content-Type" "image/gif"
HTTP::respond 200 content $::i1x1tgif "Content-Type" "image/gif"
}
Note, you do not need to account for the extra length for other characters such as the content type. You can and 1-N response headers at in the response this is not considered content.
Jon
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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