Forum Discussion
Scott_Hopkins
Nimbostratus
Aug 03, 2011Auto retry of a request when a 500 proxy error is returned.
We're working on making application failures more seamless in the event of an application crash... and our application uses a combination of the GET and POST methods. Is there a way (or even an easy ...
JRahm
Admin
Aug 04, 2011I started some work on a concept rule that would allow you to take chunks of the HTTP data and store in separate variables (from some code from Deb a while back). The chunk part is working in a clean collect/release method, and I had a working model of storing the chunks in variables (though I've misplaced that code now). What I hadn't done yet is figure out how to after something like a response, re-gather all the data for release to the server. Anyway, if you want to fiddle, here's the start:
when HTTP_REQUEST {
if { [HTTP::method] == "POST" } {
set collected 0
if { [HTTP::header exists "Content-Length"] } {
set content_len [HTTP::header Content-Length]
} else {
set content_len 0
}
if { $content_len > 0 && $content_len < 524289 } {
set collect_len $content_len
} else {
set collect_len 524288
}
if { $collect_len > 0 } {
HTTP::collect $collect_len
}
}
}
when HTTP_REQUEST_DATA {
if { $content_len > 0 } {
set collected [expr {$collected + $collect_len}]
set remaining [expr {$content_len - $collected}]
if { $remaining > 0 } {
if { $remaining < $collect_len } {
HTTP::collect $remaining
HTTP::release
return
}
HTTP::collect $collect_len
}
}
}
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