Mailinglisten-Archive |
Christian Victor schrieb:
>
> Wie kann ich denn per PHP3 einen anderen Header als "Location" senden. Z.B.
> 404 Not Found oder andere Fehlercodes?
Ich habe das noch nicht gemacht, aber ich würde es entsprechend
der HTTP-Spezifikation (siehe dazu RFC 2616, z.B. unter
http://rfc.fh-koeln.de/rfc/html/rfc2616.html) machen.
D.h.:
6.1 Status-Line
The first line of a Response message is the Status-Line,
consisting
of the protocol version followed by a numeric status code and
its
associated textual phrase, with each element separated by SP
characters. No CR or LF is allowed except in the final CRLF
sequence.
Status-Line = HTTP-Version SP Status-Code SP
Reason-Phrase CRLF
6.1.1 Status Code and Reason Phrase
The Status-Code element is a 3-digit integer result code of
the
attempt to understand and satisfy the request. These codes
are fully
defined in section 10. The Reason-Phrase is intended to give
a short
textual description of the Status-Code. The Status-Code is
intended
for use by automata and the Reason-Phrase is intended for the
human
user. The client is not required to examine or display the
Reason-
Phrase.
Wie unter 6.1 steht, muss der Status-Code an erster Stelle im
Response-Header stehen. Deshalb darf man keine Header vorweg
schicken, etwa für Cookies oder ähnliches.
Marian
--
['] | Marian Steinbach | http://www.sendung.de/
php::bar PHP Wiki - Listenarchive