Client : php
Patch: Nick Jones
The THttpClient class ensures the $uri_ property has a slash prefixed by appending one if needed in the constructor. However in THttpClient::read, there are 2 exceptions thrown where a slash is concatenated between the port and uri. This results in a superfluous slash in the TTransportException message.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1185723 13f79535-47bb-0310-9956-ffa450edef68
client: php
Patch: Dave Watson
Previously the code incorrectly ignored unknown field types. After
reading the field header, if it was an unknown type it would incorrectly
assume there was no data, and start trying to read the next field
immediately.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1179907 13f79535-47bb-0310-9956-ffa450edef68
Client: php
Patch: Marimuthu Ponnambalam
Simple Serialization errors out, due to the TBufferTransport not flushing the data into TMemoryBuffer after $object->write($protocol) in TBinarySerializer.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1161968 13f79535-47bb-0310-9956-ffa450edef68
This patch makes sure that filling the php extension's internal buffer does not cause a premature flush of the whole transport.
Patch: Nathaniel Cook
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1141668 13f79535-47bb-0310-9956-ffa450edef68
Adds a nice TBinarySerializer class to make it simple to convert between PHP objects and serialized strings using the Binary protocol.
Patch: Radu Marin
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1021521 13f79535-47bb-0310-9956-ffa450edef68
This patch adds a make target in lib/php that builds the php extension. By default configure will attempt to build this, but it can be disabled with --without-php_extension.
Patch: Anthony Molinaro
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@989226 13f79535-47bb-0310-9956-ffa450edef68
The bug was triggered when flush() threw an exception in the
PHPOutputTransport destructor.
The PHPOutputTransport in thrift_protocol_write_binary() wasn't
constructed inside of the try block, so exceptions thrown when it was
auto-flushing in the destructor were calling terminate().
Move the transport construction inside of the try block, and add an
explicit flush before the transport is destroyed (since throwing an
exception from a destructor is generally a bad thing).
Patch: David Reiss
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@984815 13f79535-47bb-0310-9956-ffa450edef68
The attachment was made with the "licensed for inclusion" option, so it
should get a standard Apache license header. Our other makefiles use
$() style for variables and don't include extra spaces before
backslashes.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@940936 13f79535-47bb-0310-9956-ffa450edef68
Pave the way for a new message type for oneway function calls.
For now, just define the constant in all languages and make
server implementations treat it the same way as a normal call.
Only C++ and Erlang currently check the message type (on the
server side).
There is a little bit of redundancy in the Erlang code, but
the alternative is a bit gross, and this split-up will be
necessary eventually when we start handling one-way calls
differently.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@761389 13f79535-47bb-0310-9956-ffa450edef68
- Modify the PHP generator constructor to fit the new generic interface.
- Register the PHP genrator with the central registry.
- Deprecate the old way of invoking the PHP generator.
- main.cc no longer includes t_php_generator.h.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@745238 13f79535-47bb-0310-9956-ffa450edef68
Summary: Otherwise, it will spin forever if your socket connection gets dropped
or otherwise times out.
Reviewed by: dbraginsky
Test plan: Modified TSocket to always throw an exception on read() and tried
some service calls
Revert: svn
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665652 13f79535-47bb-0310-9956-ffa450edef68
Summary: Avoid segfaulting via calling zend_fetch_class_entry on something
that might not actually be an object; throw an exception instead.
Reviewed by: shire
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665581 13f79535-47bb-0310-9956-ffa450edef68
Summary: The convert_to_*_ex functions were being used improperly resulting
in heap corruption in some cases; I just switched everything over to the
non-ex versions since it shouldn't matter if I modify the value being
serialized in place to coerce it to the proper type.
Also fixed a potential crash for map, set, and list types when not passed
an array, by first attempting an array conversion and then throwing a
tprotocolexception if that doesn't succeed. (Actually, PHP might fatal there
instead, it wasn't immediately clear from reading the code if that would
be the case).
Reviewed by: marcel
Test plan: Ran under php-5.2.5, debug and release builds. No more heap corruption
or memory leak complaints (the latter also a side effect of undesired zval
reference separation).
Revert: only if you love SIGSEGV
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665566 13f79535-47bb-0310-9956-ffa450edef68