--- chan_sip.c 2005-11-26 21:36:11.000000000 +0100 +++ /asterisk_src/chan_sip.c 2005-11-26 14:49:54.000000000 +0100 @@ -3303,13 +3303,23 @@ /* Divide fields by NULL's */ char *c; int f = 0; + int ignore_cr = 0; c = req->data; /* First header starts immediately */ req->header[f] = c; while(*c) { - if (*c == '\n') { + if (*c == ',') { + ignore_cr = 1; + } else if (*c == '\n') { + if (ignore_cr) + { + *c = ' '; + ignore_cr = 0; + } + else + { /* We've got a new header */ *c = 0; @@ -3325,10 +3335,14 @@ } else f++; req->header[f] = c + 1; + } } else if (*c == '\r') { /* Ignore but eliminate \r's */ - *c = 0; - } + if (ignore_cr) + *c = ' '; + else + *c = 0; + } else ignore_cr = 0; c++; } /* Check for last header */