CodeIgniter Forums
Strange Behavior - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: Strange Behavior (/showthread.php?tid=81392)



Strange Behavior - donpwinston - 02-23-2022

I have a ..../public/test.php file:
<?php print_r(getallheaders()); ?>

and I have a CI app where in a before() function of a custom filter I have:
 log_message('debug', print_r(getallheaders(), true));

I'm getting different results for the 'Host' header. The first prints the domain name of my server and the second prints the IP address.
Does anyone know why this would happen?


RE: Strange Behavior - Gary - 02-23-2022

Not sure of your exact "different" results, but recently I've also found some anomalous behavior in several of my long-time-tested-and-trusted custom Filters, that I have also yet to explain.

Sorry, I know that doesn't answer your question... but perhaps points to some sort of change in the framework (I've only noticed the changes in my site since I upgraded from v4.15 to v4.18... so either I was drunk the whole time... or something else happened).