Forum Discussion
Mohanad_313515
Apr 04, 2019Nimbostratus
irule to insert action parameter inside Content-Type header for xml request
Hello we have a lot of xml services using soap version 1.2, im facing issue regarding validate soap action header using xml profile. To summarize, while SOAP 1.1 would have these HTTP headers...
Stanislas_Piro2
Apr 09, 2019Cumulonimbus
Try this code:
when HTTP_REQUEST {
if { [set capture [expr {([HTTP::header exists Content-length] and [HTTP::method] equals "POST") and ([HTTP::header Content-Type] contains "soap")}]] } {
HTTP::collect [HTTP::header Content-Length]
}
}
when HTTP_REQUEST_DATA {
if {$capture} {
HTTP::header remove "Content-Type"
HTTP::header insert "Content-Type" "application/soap xml; charset=utf-8; action=\"[string trim [findstr [HTTP::payload] "" 31 ""] ]\""
}
}
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