From 8c6a49f001b6d90b69efc2f0311735c6e219c98a Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Tue, 15 Oct 2002 16:46:57 +0000 Subject: [PATCH] Fixed a bug in the calculation of the POST request length. --- run-tests.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/run-tests.php b/run-tests.php index 2d496e46fb6..cea33d324ae 100755 --- a/run-tests.php +++ b/run-tests.php @@ -303,7 +303,7 @@ function mail_qa_team($data, $compression) $url_bits = parse_url(QA_SUBMISSION_PAGE); if (empty($url_bits['port'])) $url_bits['port'] = 80; - $data = urlencode(base64_encode(preg_replace("/[\\x00]/", "[0x0]", $data))); + $data = "php_test_data=" . urlencode(base64_encode(preg_replace("/[\\x00]/", "[0x0]", $data))); $data_length = strlen($data); $fs = fsockopen($url_bits['host'], $url_bits['port'], $errno, $errstr, 10); @@ -317,9 +317,8 @@ function mail_qa_team($data, $compression) fwrite($fs, "User-Agent: QA Browser 0.1\r\n"); fwrite($fs, "Content-Type: application/x-www-form-urlencoded\r\n"); fwrite($fs, "Content-Length: ".$data_length."\r\n\r\n"); - fwrite($fs, "php_test_data=".$data); + fwrite($fs, $data); fwrite($fs, "\r\n\r\n"); - fflush($fs); fclose($fs); return 1;