Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.9.1
-
Tested under PHP 5.3 and HHVM latest.
-
Patch Available
Description
There are two typos in TCompactProtocol::readMessageBegin that prevent correct decoding of any message. They are on consecutive lines:
First $seqId does not match case of argument $seqid so this is not set PHP is not case sensitive for class names but IS for variable names.
Second and more importantly, on the following line $name has the decoded length assigned to it instead of $result. This means the method name "hello" ends up being decoded as "6" (the length of the string plus length prefix) and hence any processor trying to dispatch the event will fail.
I can submit a patch/pull request but its only 6 chars to change and clearly there are no automated tests for this protocol implementation as that should have been caught before.
I guess not many other people are using PHP as a thrift service processor with this protocol.
Attachments
Attachments
Issue Links
- is related to
-
THRIFT-2358 C++: add compact protocol to cross language test suite
- Closed
- relates to
-
THRIFT-3211 Add make cross support for php TCompactProtocol
- Closed
- supercedes
-
THRIFT-334 Compact Protocol for PHP
- Closed