Apache / PHP returning default http status

0

I'm creating a REST api in PHP, and in certain situations I return an HTTP status with the specific error message for what happened, for example, 403 Invalid Access Key instead of simply 403 Forbidden .

I'm using php's header () function to generate such statuses, and local is working fine, however on the production server the default status messages appear. For example, where it should return 403 Invalid Access Key , it returns the 403 Forbidden nothingness.

What could be causing this? I researched a lot and found nothing about it.

Location: Apache 2.4.9 PHP 5.5.12

Production: Apache 2.2.29 PHP 5.4.37

    
asked by anonymous 24.08.2016 / 13:37

1 answer

0

Apparently, somehow, the proxy (squid) is "standardizing" the HTTP headers. I verified this using REST clients such as Hurl and APIgee / a>, that make the requests of its own servers and not of the client, that is, it does not pass through the proxy. So, on those clients, the status returned as it should.

There's nothing I can do about it right now, so this is not a "solution" answer, but it's the hint for whoever needs it.

    
24.08.2016 / 14:27