Forum Discussion
apache2020_1037
Nimbostratus
Nov 03, 2011ASP.NET DEBUG irule
Hi
Is it possible to write an irule to trigger on an HTTP VERB type of DEBUG?
thanks
David
3 Replies
- Michael_Yates
Nimbostratus
Hi apache2020,
I don't think that "DEBUG" is a valid HTTP Verb / Method, but you can capture the the method with HTTP::method
RFC2616 - Method Definitions
Hope this helps. - 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 - apache2020_1037
Nimbostratus
thanks Kurt
will test this in the lab and see how it goes!
David
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
