2 namespace TYPO3\CMS\Extbase\Mvc\Web;
70 101 =>
'Switching Protocols',
76 203 =>
'Non-Authoritative Information',
78 205 =>
'Reset Content',
79 206 =>
'Partial Content',
80 207 =>
'Multi-Status',
81 300 =>
'Multiple Choices',
82 301 =>
'Moved Permanently',
85 304 =>
'Not Modified',
87 307 =>
'Temporary Redirect',
89 401 =>
'Unauthorized',
90 402 =>
'Payment Required',
93 405 =>
'Method Not Allowed',
94 406 =>
'Not Acceptable',
95 407 =>
'Proxy Authentication Required',
96 408 =>
'Request Timeout',
99 411 =>
'Length Required',
100 412 =>
'Precondition Failed',
101 413 =>
'Request Entity Too Large',
102 414 =>
'Request-URI Too Long',
103 415 =>
'Unsupported Media Type',
104 416 =>
'Requested Range Not Satisfiable',
105 417 =>
'Expectation Failed',
106 500 =>
'Internal Server Error',
107 501 =>
'Not Implemented',
108 502 =>
'Bad Gateway',
109 503 =>
'Service Unavailable',
110 504 =>
'Gateway Timeout',
111 505 =>
'HTTP Version Not Supported',
112 507 =>
'Insufficient Storage',
113 509 =>
'Bandwidth Limit Exceeded'
140 if (!is_int($code)) {
141 throw new \InvalidArgumentException(
'The HTTP status code must be of type integer, ' . gettype($code) .
' given.', 1220526013);
143 if ($message === null && !isset($this->statusMessages[$code])) {
144 throw new \InvalidArgumentException(
'No message found for HTTP status code "' . $code .
'".', 1220526014);
146 $this->statusCode = $code;
147 $this->statusMessage = $message === null ? $this->statusMessages[$code] : $message;
171 public function setHeader($name, $value, $replaceExistingHeader =
true)
173 if (strtoupper(substr($name, 0, 4)) ===
'HTTP') {
174 throw new \InvalidArgumentException(
'The HTTP status header must be set via setStatus().', 1220541963);
176 if ($replaceExistingHeader ===
true || !isset($this->headers[$name])) {
177 $this->headers[$name] = array($value);
179 $this->headers[$name][] = $value;
191 $preparedHeaders = array();
192 if ($this->statusCode !== null) {
193 $protocolVersion = isset($_SERVER[
'SERVER_PROTOCOL']) ? $_SERVER[
'SERVER_PROTOCOL'] :
'HTTP/1.0';
195 $preparedHeaders[] = $statusHeader;
197 foreach ($this->headers as $name => $values) {
198 foreach ($values as $value) {
199 $preparedHeaders[] = $name .
': ' . $value;
202 return $preparedHeaders;
215 if (headers_sent() ===
true) {
232 if ($this->content !== null) {
251 throw new \InvalidArgumentException(
'The additiona header data must be of type String, ' . gettype(
$additionalHeaderData) .
' given.', 1237370877);
253 if ($this->request->isCached()) {
300 return parent::shutdown();