# Http Trace Deny

**URL:** <https://community.f5.com/t/http-trace-deny/12147>\
**Category:** Technical Forums\
**Tags:** dev, irules, devops, application-delivery\
**Created:** [July 5, 2013, 6:25pm UTC](https://community.f5.com/t/http-trace-deny/12147 "2013-07-05T18:25:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TNY\_122436](https://avatars.discourse-cdn.com/v4/letter/t/3bc359/32.png) [@TNY\_122436](https://community.f5.com/u/TNY_122436)\
**Post date:** [July 5, 2013, 6:25pm UTC](https://community.f5.com/t/http-trace-deny/12147/1 "2013-07-05T18:25:00Z")

</div>

Hi, I’m trying to upgrade version 10 to 11 but there is an error pointing back to an irule that is causing an upgrade failure. I’ve then since taken the irule out but trying to paste it back but it returns me this error. Does anyone know what is causing this error?

Error:

01070151:3: Rule [/Common/HTTP\_trace\_deny] error: Unable to find value\_list (sec\_http\_methods) referenced at line 12: [matchclass [HTTP::method] equals $::sec\_http\_methods]

iRule:

when RULE\_INIT {

set sec\_http\_methods [list “CONNECT” “DELETE” “HEAD” “OPTIONS” “PUT” “TRACE”]

}

when HTTP\_REQUEST {

if { [matchclass [HTTP::method] equals $::sec\_http\_methods] } {

reject

}

}

---

<div class="post-metadata">

**Author:** ![Kevin\_Stewart](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/kevin_stewart/32/15267_2.png) [@Kevin\_Stewart](https://community.f5.com/u/Kevin_Stewart)\
**Post date:** [July 5, 2013, 7:09pm UTC](https://community.f5.com/t/http-trace-deny/12147/2 "2013-07-05T19:09:08Z")

</div>

You’ve set a non-CMP local variable in RULE\_INIT and trying to access it like a global variable. Try this:

```tcl
when RULE_INIT {
  set static::sec_http_methods [list "CONNECT" "DELETE" "HEAD" "OPTIONS" "PUT" "TRACE"]
}
when HTTP_REQUEST {
  if { [lsearch $static::sec_http_methods [HTTP::method]] ne -1 } {
    reject
  }
}

```

You’re also evaluating a list element, so you should use a list function (lsearch).

---

<div class="post-metadata">

**Author:** ![TNY\_122436](https://avatars.discourse-cdn.com/v4/letter/t/3bc359/32.png) [@TNY\_122436](https://community.f5.com/u/TNY_122436)\
**Post date:** [July 5, 2013, 8:10pm UTC](https://community.f5.com/t/http-trace-deny/12147/3 "2013-07-05T20:10:27Z")

</div>

Thanks Kevin. Your code seems to work fine. The weird thing is we have another F5 guest on the same code version and the original irule seems to be working there.

---

<div class="post-metadata">

**Author:** ![Kevin\_Stewart](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/kevin_stewart/32/15267_2.png) [@Kevin\_Stewart](https://community.f5.com/u/Kevin_Stewart)\
**Post date:** [July 5, 2013, 11:22pm UTC](https://community.f5.com/t/http-trace-deny/12147/4 "2013-07-05T23:22:04Z")

</div>

Same platforms?
