Fix $append of HTTPRequest::addHeader()
authorTim Düsterhus <timwolla@googlemail.com>
Wed, 5 Feb 2014 00:33:02 +0000 (01:33 +0100)
committerTim Düsterhus <timwolla@googlemail.com>
Wed, 5 Feb 2014 00:33:02 +0000 (01:33 +0100)
wcfsetup/install/files/lib/util/HTTPRequest.class.php

index ac47a3636c89a18fabd350c15e74d022c3271689..3ae0afdb635f95104431ceac50f06e41ca938966 100644 (file)
@@ -422,8 +422,9 @@ final class HTTPRequest {
                if ($append && isset($this->headers[$name])) {
                        $this->headers[$name][] = $value;
                }
-               
-               $this->headers[$name] = (array) $value;
+               else {
+                       $this->headers[$name] = array($value);
+               }
        }
        
        /**