1.1 --- a/imiptools/content.py Sat Oct 24 17:14:59 2015 +0200
1.2 +++ b/imiptools/content.py Sat Oct 24 19:44:20 2015 +0200
1.3 @@ -19,6 +19,7 @@
1.4 this program. If not, see <http://www.gnu.org/licenses/>.
1.5 """
1.6
1.7 +from imiptools.config import IMIP_COUNTER_AS_REQUEST
1.8 from imiptools.data import Object, parse_object, get_value
1.9
1.10 try:
1.11 @@ -51,7 +52,14 @@
1.12
1.13 # Require consistency between declared and employed methods.
1.14
1.15 - if get_value(itip, "METHOD") == method:
1.16 + itip_method = get_value(itip, "METHOD")
1.17 +
1.18 + if itip_method == method or \
1.19 + IMIP_COUNTER_AS_REQUEST and itip_method == "COUNTER" and method == "REQUEST":
1.20 +
1.21 + # Assert the object's method as the definitive one.
1.22 +
1.23 + method = itip_method
1.24
1.25 # Look for different kinds of sections.
1.26