Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology

iRule to remove payload in HTTP Request

Hi! Is there any way to completly remove the payload from an HTTP Request?

We have configured ASM to replace the PROPFIND method with GET, but it's not removing the payload from the HTTP Request... how can we remove it with an irule?


Rate this Discussion
Comments on this Discussion
Comment made 18-Nov-2016 by Kishore Kumar 241

Assuming you are rewriting the payload. You should be using

REWRITE::payload REWRITE::payload length REWRITE::payload replace

From the example


# The rewrite_response_done event isn't absolutely necessary because browser will just ignore any html tags that it doesn't recongnize.
# However, it will be cleaner if we remove it nevertheless

set data [REWRITE::payload]
# Find the tags we inserted
set start [string first {<apm_do_not_touch>} $data]
set end [string last {</apm_do_not_touch>} $data]
# Determines the amount of characters to remove
set length_open [string length {<apm_do_not_touch>}]
set length_close [string length {</apm_do_not_touch>}]

# log local0. "Starting Index:: $start"
# log local0. "Ending Index:: $end"

# Replace the number of characters taken up by the tags with nothing (e.g. null)
REWRITE::payload replace $end $length_close {}
REWRITE::payload replace $start $length_open {}
Comment made 18-Nov-2016 by Franco 175

Hi! As I'm reading, the Payload::Rewrite is only available with APM.. it doesn't work without it...



Replies to this Discussion


Hi, Do you want to just remove the payload or add your custom response ?