Skip to content

getHeaders #27

Description

@exbit

windows OS
...\system\Debug\Toolbar\View\toolbar.tpl.php

$value) : ?>
                <?php if (empty($value)) continue; ?>
                <tr>
                    <td><?= esc($value->getName()) ?></td>
                    <td><?= esc($value->getValueLine()) ?></td>
                </tr>
            <?php endforeach; ?>

var_dump($headers);

from this it follows that $value === string or $value === array

array(14) {
["Host"]=>
array(2) {
[0]=>
string(7) "ci4.loc"
[1]=>
object(CodeIgniter\HTTP\Header)#9 (2) {
["name":protected]=>
string(4) "Host"
["value":protected]=>
string(7) "ci4.loc"
}
}
["X-Real-IP"]=>
string(9) "127.0.0.1"
["X-Forwarded-For"]=>
array(2) {
[0]=>
string(9) "127.0.0.1"
[1]=>
object(CodeIgniter\HTTP\Header)#11 (2) {
["name":protected]=>
string(15) "X-Forwarded-For"
["value":protected]=>
string(9) "127.0.0.1"
}
}
["Connection"]=>
array(2) {
[0]=>
string(5) "close"
[1]=>
object(CodeIgniter\HTTP\Header)#12 (2) {
["name":protected]=>
string(10) "Connection"
["value":protected]=>
string(5) "close"
}
}
["User-Agent"]=>
array(2) {
[0]=>
string(78) "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0"
[1]=>
object(CodeIgniter\HTTP\Header)#13 (2) {
["name":protected]=>
string(10) "User-Agent"
["value":protected]=>
string(78) "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0"
}
}
["Accept"]=>
array(2) {
[0]=>
string(63) "text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8"
[1]=>
object(CodeIgniter\HTTP\Header)#14 (2) {
["name":protected]=>
string(6) "Accept"
["value":protected]=>
string(63) "text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8"
}
}
["Accept-Language"]=>
array(2) {
[0]=>
string(35) "ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3"
[1]=>
object(CodeIgniter\HTTP\Header)#15 (2) {
["name":protected]=>
string(15) "Accept-Language"
["value":protected]=>
string(35) "ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3"
}
}
["Accept-Encoding"]=>
array(2) {
[0]=>
string(13) "gzip, deflate"
[1]=>
object(CodeIgniter\HTTP\Header)#16 (2) {
["name":protected]=>
string(15) "Accept-Encoding"
["value":protected]=>
string(13) "gzip, deflate"
}
}
["DNT"]=>
string(1) "1"
["Pragma"]=>
array(2) {
[0]=>
string(8) "no-cache"
[1]=>
object(CodeIgniter\HTTP\Header)#18 (2) {
["name":protected]=>
string(6) "Pragma"
["value":protected]=>
string(8) "no-cache"
}
}
["Cache-Control"]=>
array(2) {
[0]=>
string(8) "no-cache"
[1]=>
object(CodeIgniter\HTTP\Header)#19 (2) {
["name":protected]=>
string(13) "Cache-Control"
["value":protected]=>
string(8) "no-cache"
}
}
["Content-Type"]=>
bool(false)
["X-Real-Ip"]=>
object(CodeIgniter\HTTP\Header)#10 (2) {
["name":protected]=>
string(9) "X-Real-Ip"
["value":protected]=>
string(9) "127.0.0.1"
}
["Dnt"]=>
object(CodeIgniter\HTTP\Header)#17 (2) {
["name":protected]=>
string(3) "Dnt"
["value":protected]=>
string(1) "1"
}
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions