src/Guzzle/Http/Message/Header.php
public function normalize()
    {
        $values = $this->toArray();

        for ($i = 0, $total = count($values); $i < $total; $i++) {
            if (strpos($values[$i], $this->glue) !== false) {
                // Explode on glue when the glue is not inside of a comma
                foreach (preg_split('/' . preg_quote($this->glue) . '(?=([^"]*"[^"]*")*[^"]*$)/', $values[$i]) as $v) {
                    $values[] = trim($v);
                }
                unset($values[$i]);
            }
        }

        $this->values = array_values($values);

        return $this;
    }
public function normalize()
    {
        $values = $this->toArray();

        for ($i = 0, $total = count($values); $i < $total; $i++) {
            if (strpos($values[$i], $this->glue) !== false) {
                // Explode on glue when the glue is not inside of a comma
                foreach (preg_split('/' . preg_quote($this->glue) . '(?=([^"]*"[^"]*")*[^"]*$)/', $values[$i]) as $v) {
                    $values[] = trim($v);
                }
                unset($values[$i]);
            }
        }

        $this->values = array_values($values);

        return $this;
    }
public function normalize ( ) { $ values = $ this -> toArray ( ) ; for ( $ i = 0 , $ total = count ( $ values ) ; $ i < $ total ; $ i ++ ) { if ( strpos ( $ values [ $ i ] , $ this -> glue ) !== false ) { // Explode on glue when the glue is not inside of a comma foreach ( preg_split ( '/' . preg_quote ( $ this -> glue ) . '(?=([^"]*"[^"]*")*[^"]*$)/' , $ values [ $ i ] ) as $ v ) { $ values [ ] = trim ( $ v ) ; } unset ( $ values [ $ i ] ) ; } } $ this -> values = array_values ( $ values ) ; return $ this ; }
Normalize the header to be a single header with an array of values.

If any values of the header contains the glue string value (e.g. ","), then the value will be exploded into
multiple entries in the header.

@return self
Normalize the header to be a single header with an array of values .