Hi all.
Let's assume that I want to check whether the current request uses a given
method. The following statements would work for that:
1. if (method == INVITE) { ... }
2. if (method == "INVITE") { ... }
3. if (is_method("INVITE")) { ... }
Now I wonder:
>From what I can tell it does not seem to matter wheter or not the tested
method is quoted (like in 2) or not (like in 1). But maybe there is a
non-obvious difference, something like "without quotes results in a
case-insensitive compare, but it works only for the methods defined in
RFCxyz"?
is_method() used in 3. certainly is more powerful as it allows to test for
multiple methods per call (using: ...
is_method("PUBLISH|MESSAGE|SUBSCRIBE") ...), but how does it perform
compared to the statements used in 1. and 2. for a single comparison?
Last but not least, is it worth at all to worry about these kind of
questions? :-)
Bye, Mike
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users