Skip to content

Commit 8876639

Browse files
authored
1 parent 59c3896 commit 8876639

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

sapi/cli/php_cli_server.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2065,6 +2065,7 @@ static zend_result php_cli_server_send_error_page(php_cli_server *server, php_cl
20652065
goto fail;
20662066
}
20672067
append_essential_headers(&buffer, client, 1, NULL);
2068+
smart_str_appends_ex(&buffer, SAPI_PHP_VERSION_HEADER "\r\n", 1);
20682069
smart_str_appends_ex(&buffer, "Content-Type: text/html; charset=UTF-8\r\n", 1);
20692070
smart_str_appends_ex(&buffer, "Content-Length: ", 1);
20702071
smart_str_append_unsigned_ex(&buffer, php_cli_server_buffer_size(&client->content_sender.buffer), 1);

sapi/cli/tests/php_cli_server_013.phpt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ HTTP/1.1 404 Not Found
127127
Host: %s
128128
Date: %s
129129
Connection: close
130+
X-Powered-By: PHP/%s
130131
Content-Type: text/html; charset=UTF-8
131132
Content-Length: %d
132133

@@ -136,6 +137,7 @@ HTTP/1.1 404 Not Found
136137
Host: %s
137138
Date: %s
138139
Connection: close
140+
X-Powered-By: PHP/%s
139141
Content-Type: text/html; charset=UTF-8
140142
Content-Length: %d
141143

@@ -145,6 +147,7 @@ HTTP/1.1 404 Not Found
145147
Host: %s
146148
Date: %s
147149
Connection: close
150+
X-Powered-By: PHP/%s
148151
Content-Type: text/html; charset=UTF-8
149152
Content-Length: %d
150153

@@ -153,6 +156,7 @@ HTTP/1.1 405 Method Not Allowed
153156
Host: %s
154157
Date: %s
155158
Connection: close
159+
X-Powered-By: PHP/%s
156160
Content-Type: text/html; charset=UTF-8
157161
Content-Length: %d
158162
Allow: GET, HEAD, POST
@@ -163,6 +167,7 @@ HTTP/1.1 405 Method Not Allowed
163167
Host: %s
164168
Date: %s
165169
Connection: close
170+
X-Powered-By: PHP/%s
166171
Content-Type: text/html; charset=UTF-8
167172
Content-Length: %d
168173
Allow: GET, HEAD, POST
@@ -173,6 +178,7 @@ HTTP/1.1 405 Method Not Allowed
173178
Host: %s
174179
Date: %s
175180
Connection: close
181+
X-Powered-By: PHP/%s
176182
Content-Type: text/html; charset=UTF-8
177183
Content-Length: %d
178184
Allow: GET, HEAD, POST

sapi/cli/tests/php_cli_server_014.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ HTTP/1.1 404 Not Found
6565
Host: %s
6666
Date: %s
6767
Connection: close
68+
X-Powered-By: PHP/%s
6869
Content-Type: %s
6970
Content-Length: %d
7071

0 commit comments

Comments
 (0)