[OpenSIPS-Devel] [OpenSIPS/opensips] 5f5d1a: Refactor generic parse_to() to accept multi-value ...

Bogdan-Andrei Iancu bogdan at opensips.org
Tue Dec 19 07:56:38 EST 2017


  Branch: refs/heads/2.2
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 5f5d1a1601e3ee096e9f924c154cef2133a672e4
      https://github.com/OpenSIPS/opensips/commit/5f5d1a1601e3ee096e9f924c154cef2133a672e4
  Author: Bogdan-Andrei Iancu <bogdan at opensips.org>
  Date:   2017-12-19 (Tue, 19 Dec 2017)

  Changed paths:
    M parser/parse_to.c
    M parser/parse_to.h

  Log Message:
  -----------
  Refactor generic parse_to() to accept multi-value headers.

New function parse_multi_to() added to allow parsing of multi-value (comma separated) name-addr/addr-spec headers (like Diversion, PAI, PPI).
Changes are backward compatible in regards to original parse_to() function.

(cherry picked from commit a7e724a09c01c78a5f3c303d2966a55883eaffeb)


  Commit: 6ef5ed61b4ea8ba8f560f88e7f1068fde6bccde9
      https://github.com/OpenSIPS/opensips/commit/6ef5ed61b4ea8ba8f560f88e7f1068fde6bccde9
  Author: Bogdan-Andrei Iancu <bogdan at opensips.org>
  Date:   2017-12-19 (Tue, 19 Dec 2017)

  Changed paths:
    M parser/parse_diversion.c
    M parser/parse_pai.c
    M parser/parse_ppi.c

  Log Message:
  -----------
  Fix hdr parsing to accept multi-value bodies.

The parser for Diversion, PAI and PPI use now the parse_multi_to() in order to handle multi name-addr/addr-spec hdr bodies.

(cherry picked from commit 908b9f190bff3b356f76ce8ca75d43a2c149a412)


  Commit: 230c45fe5bd272f22f5e2c73bdea604aaad212d9
      https://github.com/OpenSIPS/opensips/commit/230c45fe5bd272f22f5e2c73bdea604aaad212d9
  Author: Bogdan-Andrei Iancu <bogdan at opensips.org>
  Date:   2017-12-19 (Tue, 19 Dec 2017)

  Changed paths:
    M modules/sipmsgops/sipmsgops.c

  Log Message:
  -----------
  Fix validation for PAI, PPI and Diversion headers

These headers must be parsed as multu-field headers
Also for PAI and PPI we apply extra checks as per RFC3325.

Close #1134
Close #1228

(cherry picked from commit 69ef92cd9f74020da5398eab0f81668bb8e12281)


Compare: https://github.com/OpenSIPS/opensips/compare/cbfef48c726b...230c45fe5bd2


More information about the Devel mailing list