You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@thrift.apache.org by "Volodymyr Panivko (Jira)" <ji...@apache.org> on 2026/08/30 19:17:00 UTC
[jira] [Created] (THRIFT-6167) PHP HTTP cross-test server omits Content-Length and breaks php-cpp HTTP cases
Volodymyr Panivko created THRIFT-6167:
-----------------------------------------
Summary: PHP HTTP cross-test server omits Content-Length and breaks php-cpp HTTP cases
Key: THRIFT-6167
URL: https://issues.apache.org/jira/browse/THRIFT-6167
Project: Thrift
Issue Type: Bug
Components: C++ - Library, PHP - Library, Test Suite
Reporter: Volodymyr Panivko
Fix For: 0.25.0
On synced master (tested on August 30, 2026 at 588053de15907d2b769aeb4662e1e3c142000fe9), the php->cpp HTTP cross-tests still fail for binary, compact, and json despite THRIFT-6023 and THRIFT-6060 being merged.
Reproduction:
1. Sync to current apache/master.
2. Build the PHP and C++ cross-test prerequisites.
3. Run the php-cpp HTTP cases:
- php-cpp_binary_http-ip
- php-cpp_compact_http-ip
- php-cpp_json_http-ip
Actual result:
- The C++ client aborts on testVoid() with TTransportException: No more data to read.
- These cases remain listed in test/known_failures_Linux.json.
Root cause found during local validation:
- test/php/HttpServer.php dispatchSync() writes the thrift response body with echo but does not set Content-Length.
- The C++ HTTP transport expects a framed response body (Content-Length or chunked framing) and fails reading the PHP built-in server response.
- test/php/HttpRouter.php also does not preserve the same launcher flags as tests.json when it execs into php -S, which causes noisy startup warnings under some local PHP setups.
Validated fix:
- Add Content-Length for the sync response in test/php/HttpServer.php.
- Preserve the launcher flags in test/php/HttpRouter.php when entering php -S.
- Remove php-cpp_binary_http-ip, php-cpp_compact_http-ip, and php-cpp_json_http-ip from test/known_failures_Linux.json.
Validation after the fix:
- php->cpp HTTP: binary, compact, json all pass
- cpp->php HTTP: binary, compact, json, multi-binary, multic-compact, multij-json all pass
Affected clients: php, cpp
--
This message was sent by Atlassian Jira
(v8.20.10#820010)