I have taken some time to investigate this issue and the problem is that you 
use the "isalpha" function in the is_mime_char routine:

```C
#define is_mime_char(_c_) \
        (isalpha((int)_c_) || (_c_)=='-' || (_c_)=='+' || (_c_)=='.' || 
(_c_)=='_')
```

But a MIME type can have digits in it (as you can see in some MIME types 
registered with IANA: 
http://www.iana.org/assignments/media-types/media-types.xhtml)

So a more convenient validation function would be "isalnum":

```C
#define is_mime_char(_c_) \
        (isalnum((int)_c_) || (_c_)=='-' || (_c_)=='+' || (_c_)=='.' || 
(_c_)=='_')
```

After changing this, there is no more parsing errors.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/561#issuecomment-205406611
_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to