Hello,
It would be great if there was an option to tell PHP to let the user
manage all the HTTP headers instead of sending what it thinks is good for
the programmer...
For example when you write:
header("Status: 200 OK");
header("Locatio n: /my_internal_red irected_page.ph p");
PHP "decides" that the status will be "302 moved", ignoring the "Status:
200 OK" (ie: the programmer is stupid)...
I use PHP as a cgi along with mod_fastcgi, when fastcgi sees a relative
redirection with a "200 OK" status it autaumatically do an internal
redirection (very useful in some cases, to hide a file url for example).
Well, in PHP 4.3.4, the only way I found to achieve this was this
wonderful trick:
header("Locatio n: /my_internal_red irected_page.ph p");
header("HTTP/1.0 200 OK");
If you put the Location header after the "HTTP/1.0 200 OK" header PHP
sends a 302 status without the Location header (no comment).
That reminds me Micro$oft programs that always know better what the user
wants to do than the user himself...
It is a pity which PHP behaves like micro$oft, if the programmer sends
stupid HTTP headers, PHP should let him do...
So I think that an option to let the programmer send all http headers
would be great, that way people who don't want to care about headers
won't have troubles and experimented programmers will be happy :)
I would like to thank all PHP developpers for their great work and I hope
they'll consider this suggestion ;)
John
PS: I posted this suggestion here because I don't know where to send
it... If someone knows a better place, please tell me.
It would be great if there was an option to tell PHP to let the user
manage all the HTTP headers instead of sending what it thinks is good for
the programmer...
For example when you write:
header("Status: 200 OK");
header("Locatio n: /my_internal_red irected_page.ph p");
PHP "decides" that the status will be "302 moved", ignoring the "Status:
200 OK" (ie: the programmer is stupid)...
I use PHP as a cgi along with mod_fastcgi, when fastcgi sees a relative
redirection with a "200 OK" status it autaumatically do an internal
redirection (very useful in some cases, to hide a file url for example).
Well, in PHP 4.3.4, the only way I found to achieve this was this
wonderful trick:
header("Locatio n: /my_internal_red irected_page.ph p");
header("HTTP/1.0 200 OK");
If you put the Location header after the "HTTP/1.0 200 OK" header PHP
sends a 302 status without the Location header (no comment).
That reminds me Micro$oft programs that always know better what the user
wants to do than the user himself...
It is a pity which PHP behaves like micro$oft, if the programmer sends
stupid HTTP headers, PHP should let him do...
So I think that an option to let the programmer send all http headers
would be great, that way people who don't want to care about headers
won't have troubles and experimented programmers will be happy :)
I would like to thank all PHP developpers for their great work and I hope
they'll consider this suggestion ;)
John
PS: I posted this suggestion here because I don't know where to send
it... If someone knows a better place, please tell me.
Comment