Forum Discussion
killyou_51014
May 23, 2012Nimbostratus
iRule that redirects client to FTP from HTTP if downloading file greater than 10 MB
Hello. I would like to write an iRule that redirects client from HTTP to FTP while downloading file larger than 10MB. Could you help me please? This doesn't work at all: whe...
killyou_51014
May 24, 2012Nimbostratus
I got it to work. It looks like this right now:
when HTTP_REQUEST {
if { [HTTP::uri] ends_with ".exe"}{
set uri [HTTP::uri]
log "here1"
}
}
when HTTP_RESPONSE {
if {[HTTP::header "Content-Length"] >= 1048576 && [HTTP::header "Content-type"] contains "application" }{
HTTP::redirect "ftp://user1:useruser@192.168.0.1:21$uri"
log "here2"
}
}
The only problem is that before the download from FTP start it takes about 1 minute for BIG-IP to process (I'm using virtual edition). Logs are generated immidiately and I'm confused why redirect isn't sent immidiately too. After analysing tcpdump on server side it seems that BIG-IP is downloading whole file first before user is redirected to FTP server. How to fix it or how should I do this properly?
Please help me guys.
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