fix: emit full raw http responses

This commit is contained in:
Marek Miklewicz
2026-06-30 19:53:28 +02:00
parent d5894a1935
commit e2814fd81c
4 changed files with 88 additions and 23 deletions
+12
View File
@@ -12,3 +12,15 @@ test('http redirect page performs top level browser navigation', function (): vo
assert_contains('https://mx1.domena.pl:2222/api/login/url?key=SECRET&x=1', $html);
assert_contains('https://mx1.domena.pl:2222/api/login/url?key=SECRET\\u0026x=1', $html);
});
test('http raw response is a complete http response for directadmin proxy', function (): void {
$response = Http::rawHttpResponse(200, [
'Content-Type' => 'text/html; charset=UTF-8',
'Cache-Control' => 'no-store, private',
], '<!doctype html><html></html>');
assert_contains("HTTP/1.1 200 OK\r\n", $response);
assert_contains("Content-Type: text/html; charset=UTF-8\r\n", $response);
assert_contains("Content-Length: 28\r\n", $response);
assert_contains("\r\n\r\n<!doctype html><html></html>", $response);
});
+1 -1
View File
@@ -8,7 +8,7 @@ test('plugin metadata and packaging docs match project rules', function (): void
assert_contains('name=mail-login', $conf);
assert_contains('id=mail-login', $conf);
assert_contains('type=user', $conf);
assert_contains('version=1.0.10', $conf);
assert_contains('version=1.0.11', $conf);
assert_contains('user_run_as=root', $conf);
assert_contains('/Users/marek/GPT/ChatGPT/da_plugins/mail-login/src', $packing);
assert_contains('/Users/marek/GPT/ChatGPT/da_plugins/mail-login/archives/X.Y.Z/mail-login.tar.gz', $packing);