/**
  * Converts an array of header values that may contain comma separated
  * headers into an array of headers with no comma separated values.
  *
  * @param MessageInterface $message That contains the header
  * @param string              $header  Header to retrieve from the message
  *
  * @return array Returns the normalized header field values.
  */
 public static function normalizeHeader(MessageInterface $message, $header)
 {
     $h = $message->getHeaderAsArray($header);
     for ($i = 0, $total = count($h); $i < $total; $i++) {
         if (strpos($h[$i], ',') === false) {
             continue;
         }
         foreach (preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $h[$i]) as $v) {
             $h[] = trim($v);
         }
         unset($h[$i]);
     }
     return $h;
 }