Forum Discussion
supportrsd_1762
Dec 13, 2014Nimbostratus
Irule insert html attribute, APM
Hello I found this known issue in 11.6 475163 "The result of submitting an HTML form that does not have an action attribute is a 404 error and 'null' in the request URL. Workaround: Add attribut...
Michael_Jenkins
Dec 15, 2014Cirrostratus
Another option would be to use a stream profile on the VIP, and do a custom replacement. Below is some code to help with that. You'll want to modify the HTTP_REQUEST check for the URI to whatever you're looking for. But this worked for me when I tested it.
Basically, it will have the profile find matches where there's a tag and then when it finds it, in the STREAM_MATCHED event, if there's no action attribute, it will add it.
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] contains "/Whatever/You/Are/Looking/For" } {
Remove the Accept-Encoding header so that the server will not compress the response
(otherwise the stream rewriter won't work, since it doesn't decompress the stream)
HTTP::header remove "Accept-Encoding"
Set a variable so we know to do custom stream rewrite
set strReplace 1
}
}
when HTTP_RESPONSE {
if { [info exists strReplace] && $strReplace && [HTTP::header "Content-Type"] contains "html" } {
Look for any form tags
set expr {@]*>@@}
Disable the stream profile so we can manually update it
STREAM::disable
}
}
when STREAM_MATCHED {
Log the match that was found
log local0. " Match: '[STREAM::match]'"
Manual replacement to add the action attribute (since we couldn't check in expression)
if { not ([STREAM::match] contains "action=") } {
STREAM::replace [string map {"
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