Forum Discussion
crate_17871
Nimbostratus
Sep 04, 2017Append characters within Content-Type Header
Hi DevCentral,
Is it possible to write an iRule to modify the
Content-Type: multipart/form-data; boundary=---------------------------114131096815017 to
Content-Type: multipart/form-data; b...
Jad_Tabbara__J1
Cirrostratus
Sep 05, 2017Hello Crate,
Could you try the following irule
when HTTP_REQUEST {
if { [HTTP::header "Content-Type"] contains "boundary=" } {
log local0. "Content-Type value BEFORE : [HTTP::header "Content-Type"]"
set content_type [HTTP::header "Content-Type"]
if { [scan $content_type {%[^=]=%s} first second] == 2 } {
set new_content_type "$first=--$second"
HTTP::header replace "Content-Type" $new_content_type
log local0. "Content-Type value AFTER: [HTTP::header "Content-Type"]"
}
}
}
Hope it helps
Please give me a feedback
Regards
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
