Forum Discussion
Use HTTP::respond and clone together
I am attempting to host a virtual page using HTTP::respond that can have data posted to it, but will still clone that posted data even though HTTP::respond keeps it from ever even going though pool selection.
So I have cobbled together an iRule that checks for a POST and the correct phrase in the URI. If that's all true I collect the data, try to clone it, and then use HTTP::respond to give a 200 message.
The clone infrastructure is working correctly, I just can not clone this traffic I am using HTTP::respond on. Any Ideas on what I cam missing here?
when HTTP_REQUEST {
if {[HTTP::method] eq "POST" && [string tolower [HTTP::path]] contains "abc123" }{
if {[HTTP::header "Content-Length"] ne "" && [HTTP::header "Content-Length"] <= 1048576}{
set content_length [HTTP::header "Content-Length"] }
else { set content_length 1048576 }
if { $content_length > 0} { HTTP::collect $content_length
}
}
}
when HTTP_REQUEST_DATA {
clone pool abc123
set count [string length [HTTP::payload]]
set response "received a total of $count of a planned $content_length bytes"
HTTP::respond 200 content $response
}
the knowledge base article hints at only sending traffic actually send to the pool, if that doesn't happen you might be unlucky, perhaps such a client side pool works? have you tried with a clone pool configured on the virtual server, does it work then?
https://support.f5.com/csp/article/K8573
https://support.f5.com/csp/article/K13392
Recent Discussions
Related Content
* 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