"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 attribute "action=''" into the HTML form tag, either by modifying the source or by using an iRule."
For some reason its working while using internet explorer, but firefox and chrome casuses problem for a specific webapplication.
While using different developer tools, i found the affected part of the code, and added a attribute like this action=“”
So how do i fix this with a irule, i need to search so everytime i using that specific resource, the apm should insert this
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 {"
Im not really getting this, why do i want to disable the stream profile? How can i get a match then? I have placed debug messages and i pass both http respnse and http request, but not stream_matched
So sorry. I didn’t give you the right code. Try this. should work better.
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
Disable the default stream profile so we can modify it on response
STREAM::disable
}
}
when HTTP_RESPONSE {
if { [info exists strReplace] && $strReplace && [HTTP::header "Content-Type"] contains "html" } {
Look for any form tags
set expr {@]*>@@}
STREAM::expression $expr
Enable the stream profile
STREAM::enable
}
}
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 {"