diff --git a/test/TlsIconTest.php b/test/TlsIconTest.php index 0218452..f52c4d4 100644 --- a/test/TlsIconTest.php +++ b/test/TlsIconTest.php @@ -41,10 +41,10 @@ public function testStorage_Init() { $o = new tls_icon(); $this->assertSame([ - 'fetch_headers' => ' RECEIVED' + 'fetch_headers' => 'RECEIVED' ], $o->storage_init([])); $this->assertSame([ - 'fetch_headers' => ' RECEIVED' + 'fetch_headers' => 'RECEIVED' ], $o->storage_init(['fetch_headers' => null])); $this->assertSame([ 'fetch_headers' => 'foo bar RECEIVED' diff --git a/tls_icon.php b/tls_icon.php index d05a334..a6bbecc 100644 --- a/tls_icon.php +++ b/tls_icon.php @@ -42,7 +42,7 @@ function get_received_header_content($Received_Header) public function storage_init($p) { $headers = isset($p['fetch_headers']) ? $p['fetch_headers'] : ''; - $p['fetch_headers'] = trim($headers) . ' ' . strtoupper('Received'); + $p['fetch_headers'] = trim(trim($headers) . ' ' . strtoupper('Received')); return $p; }