Forum Discussion
Jorge_Cabanilla
Nimbostratus
Jul 08, 2010Send a binary file as content in http:response, I need help
Hi,
Some one knows how to send a binary file as content in an HTTP:respond?
Is it possible to assign a file to a variable?
How to read a file?
I need the next:
...
Jorge_Cabanilla
Nimbostratus
Jul 12, 2010Yes it works using the b64 encryption method and a class . With version 9.4.7 the b64encode command is not available, anyway this is what I did:
1.- Encode the wbxml file to b64 using http://www.motobit.com/util/base64-decoder-encoder.asp
2.- Create the class file( type string) , the file is on /var/config/class/
3.- In the event when rule_init, declare the variable:
set wbxml_bin [b64decode [lindex $wbxml_b64 0]]
4.- Send the response
clientside {HTTP::respond 200 content $::wbxml_bin Content-Type "application/vnd.syncml+wbxml" Connection Close}
Thanks so much all for your help
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