Forum Discussion
Adir,
Thanks for posting your question on DevCentral. Could you post your current iRule for easier diagnosis?
Thanks
- AdirZeFeb 04, 2023Altocumulus
when RULE_INIT {
# Limit payload collection to 5Mb
set static::max_collect_len 5368709
# Max characters to log locally (must be less than 1024 bytes)
set static::max_chars 900
}when HTTP_REQUEST {
set collect 0
if { [HTTP::path] eq "*" } {
set collect 1
}
}when HTTP_RESPONSE {
if { $collect eq 1 } {
if {[HTTP::header exists "Content-Length"]}{
set collect_length_resp [HTTP::header "Content-Length"]
log local0. "Content-Length exists [HTTP::header "Content-Length"]"
} else {
HTTP::payload rechunk
set collect_length_resp $static::max_collect_len
}
HTTP::collect $collect_length_resp
}
}
when HTTP_RESPONSE_DATA {
log local0. "Response Collected [HTTP::payload length] bytes"
set newData [string map { * **} [HTTP::payload]]
HTTP::payload replace 0 $collect_length_resp $newData
HTTP::payload rechunk
HTTP::release
}Edited by Leslie_Hubertus to tag G-Rob to make sure he sees the follow-up. 🙂