Metaswitch/sprout — pull request #807 by rkday (2014-10-07 20:31:51+00:00)
Title: Fix up icid-values  some more.

Fixes #486.

Most of the issues have already been resolved, by https://github.com/Metaswitch/sprout/commit/e0e9830b3a3af390bc9a3da205c7e4b9f742aa14#diff-2ef3671b84bf856b95dce4da51471524 - which quotes the icid-value in all outgoing headers.

However, I've:
* added a couple more unit tests for various icid-values (a hostname, an IPv6 address, and the original example from #486)
* fixed up the case where the icid-value was just an IPv6 address (where its enclosing [ and ] weren't preserved)
* fixed up the case where the Call-ID can contain one double quote (which previously got transposed to the icid-value and messed up the quoting), and updated the unit tests to cover that case

UTed but not tested live.