Gorf_33479
Oct 31, 2011Nimbostratus
HTTP::respond 405 still sends server header
I'm using an iRule to protect some services. One thing I am filtering on is the method.
Below is my basic rule. However the problem is that when it does it's thing it doesn't appear
to be obeying the "noserver" argument. This rule:
when RULE_INIT {
set allowed_http_methods [list "GET" "POST" "Head"]
}
when HTTP_REQUEST {
set uri [string tolower [HTTP::uri]]
if { not ([matchclass [HTTP::method] equals $::allowed_http_methods]) } {
HTTP::respond 405 noserver
}
}
Still produces this output:
REQUEST: **************\n
TRACE / HTTP/1.1\r\n
Host: my.site.com\r\n
Accept: */*\r\n
\r\n
RESPONSE: **************\n
HTTP/1.0 405 Method Not Allowed\r\n
Server: BigIP\r\n
Connection: Keep-Alive\r\n
Content-Length: 0\r\n
\r\n
Any thoughts?