@@ -502,14 +502,18 @@ |
||
502 | 502 | $key = $h[ 0 ]; // [+] |
503 | 503 | } else // [+] |
504 | 504 | { // [+] |
505 | - if (substr($h[ 0 ], 0, 1) == "\t") // [+] |
|
505 | + if (substr($h[ 0 ], 0, 1) == "\t") { |
|
506 | + // [+] |
|
506 | 507 | { |
507 | 508 | $headers[ $key ] .= "\r\n\t" . trim($h[ 0 ]); |
509 | + } |
|
508 | 510 | } // [+] |
509 | - elseif ( ! $key) // [+] |
|
511 | + elseif ( ! $key) { |
|
512 | + // [+] |
|
510 | 513 | { |
511 | 514 | $headers[ 0 ] = trim($h[ 0 ]); |
512 | 515 | } |
516 | + } |
|
513 | 517 | trim($h[ 0 ]); // [+] |
514 | 518 | } // [+] |
515 | 519 | } |
@@ -432,13 +432,13 @@ |
||
432 | 432 | } |
433 | 433 | |
434 | 434 | foreach ([ |
435 | - 'HTTP_CLIENT_IP', |
|
436 | - 'HTTP_FORWARDED', |
|
437 | - 'HTTP_X_FORWARDED_FOR', |
|
438 | - 'HTTP_X_CLIENT_IP', |
|
439 | - 'HTTP_X_CLUSTER_CLIENT_IP', |
|
440 | - 'REMOTE_ADDR', |
|
441 | - ] as $header |
|
435 | + 'HTTP_CLIENT_IP', |
|
436 | + 'HTTP_FORWARDED', |
|
437 | + 'HTTP_X_FORWARDED_FOR', |
|
438 | + 'HTTP_X_CLIENT_IP', |
|
439 | + 'HTTP_X_CLUSTER_CLIENT_IP', |
|
440 | + 'REMOTE_ADDR', |
|
441 | + ] as $header |
|
442 | 442 | ) { |
443 | 443 | if (null !== ($ipAddress = $this->server($header))) { |
444 | 444 | if (filter_var($ipAddress, FILTER_VALIDATE_IP)) { |