Forum Discussion
chenchiiren_213
Nimbostratus
May 16, 2017HTTP Payload Log
I want to analyze http response content. So, i wrote an irule code as below:
when HTTP_REQUEST {
set replace_content 1
HTTP::header remove "Accept-Encoding"
if { [HTTP::version] eq...
Jad_Tabbara__J1
Cirrostratus
May 16, 2017You can see what "Content-Type" you are printing by logging the "Content-Type" header using
when HTTP_RESPONSE_DATA {
if {$replace_content equals "1"} {
set payload [HTTP::payload]
log "Content-Type: [HTTP::header Content-Type]"
log $payload
}
}
If you need to print only readable "text" you may limit logging to "text" content-type by adding one condition :
when HTTP_RESPONSE {
if { ($replace_content equals "1") AND ([HTTP::header "Content-Type"] contains "text") }
{
...
Regards
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
