HTTP content rewrite iRule
The error is:
011f0007:3:
http_process_state_early_100continue - Invalid action EV_COLLECT
I'm pretty sure the issue is somewhere around this line:
if { $content_len > 0 && [HTTP::status] != 100 } {
Not sure why it's even running a collect if the http status is 100...
when HTTP_REQUEST {
set usentlm 0
if { ([HTTP::uri] starts_with "/sso/autodiscover/") } {
log "OWA Rewrite for autodiscover SSO engaged"
set usentlm 1
HTTP::uri [string map { /sso/autodiscover/ /autodiscover/ } [HTTP::uri]]
HTTP::uri "/autodiscover/autodiscover.xml"
Don't allow data to be chunked.
if {[HTTP::version] == "1.1"} {
if {[HTTP::header is_keepalive]} {
Adjust the Connection header.
HTTP::header replace "Connection" "Keep-Alive"
}
HTTP::version "1.0"
}
}
}
when HTTP_RESPONSE {
if { $usentlm equals 1 } {
if {[HTTP::header exists "Content-Length"]} {
set content_len [HTTP::header "Content-Length"]
} else {
set content_len 4294967295
}
if { $content_len > 0 && [HTTP::status] != 100 } {
HTTP::collect $content_len
}
}
}
when HTTP_RESPONSE_DATA {
if { $usentlm equals 1 } {
set payload [HTTP::payload]
set length [HTTP::payload length]
set new_payload [string map {Basic Ntlm} $payload]
if { $new_payload ne $payload } {
Replace the content if there was any matches
log "SSO Autodiscover rule applied"
HTTP::payload replace 0 $length $new_payload
}
}
}