[OpenSIPS-Devel] BUG: PUA_BLA requires "Subscription-State" case sensitive !

Iñaki Baz Castillo ibc at aliax.net
Mon Oct 27 23:43:16 CET 2008


Hi, I've realized that pua_bla requires "Subscription-State" header being case 
sensitive.

A Polycom phone sends:
  Subscription-state: active;expires=200
instead of:
  Subscription-State: active;expires=200
(note the "S" of "State").
This produces an error in pua_bla:

  ERROR:pua_bla:bla_handle_notify: No Subscription-State header found
  

Of course this is a bug since SIP syntax defines header names as case 
insensitive.


When I send a NOTIFY with:
  Event: dialog;sla
  Subscription-state: active;expires=2009

pua_bla says:
  ERROR:pua_bla:bla_handle_notify: No Subscription-State header found

This doesn't occur if I send "Subscription-State".


I see in notify.c code:

       while (hdr!= NULL)
        {
                if(strncmp(hdr->name.s, "Subscription-State",18)==0 )
                {
                        found = 1;
                        break;
                }
                hdr = hdr->next;
        }
        if(found==0 )
        {
                LM_ERR("No Subscription-State header found\n");
                goto error;
        }

AFAIK the above comparision based on "strncmp" is case sensitive so it breaks 
SIP syntax.




-- 
Iñaki Baz Castillo



More information about the Devel mailing list