Forum Discussion
apache2020_1037
Nov 03, 2011Nimbostratus
ASP.NET DEBUG irule
Hi
Is it possible to write an irule to trigger on an HTTP VERB type of DEBUG?
thanks
David
Kurt_Knochner_5
Nov 03, 2011Cirrus
Hi,
I asked myself, if [HTTP::method] would detect the DEBUG verb, although the http profile does not support it.
Result: Yes it works.
[HTTP::method] delivers whatever string comes first in the TCP connection, until the first blank.
local/tmm info tmm[5191]: Rule rule1 : HTTP::request: DEBUG / HTTP/1.0
local/tmm info tmm[5191]: Rule rule1 : HTTP::method: DEBUG
local/tmm info tmm[5191]: Rule rule1 : HTTP::request: DEBUG DEBUG / HTTP/1.0
local/tmm info tmm[5191]: Rule rule1 : HTTP::method: DEBUG
local/tmm info tmm[5191]: Rule rule1 : HTTP::request: DEBUG_DEBUG / HTTP/1.0
local/tmm info tmm[5191]: Rule rule1 : HTTP::method: DEBUG_DEBUG
INTERESTING! If there is a blank in front of the first string, [HTTP::method] returns nothing.
local/tmm info tmm[5191]: Rule rule1 : HTTP::request: BLANK_IN_FRONT / HTTP/1.0
local/tmm info tmm[5191]: Rule rule1 : HTTP::method:
However, that's O.K., as the HTTP RFC defines a Request-Line like this:
Request-Line = Method SP Request-URI SP HTTP-Version CRLF
While method is one of the well known strings "GET", "POST", etc.
Regarding your request, you might use the iRule below as a template.
when HTTP_REQUEST {
if { [HTTP::method] equals "DEBUG" } {
do something
log local0. "DEBUG method found"
}
}
Regards
Kurt Knochner
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