- Add a new Logger type to make logging configurable
- Use the new logger in TSimpleServer and TDebugProtocol
- Remove pointless log in TZlibTransport
- Remove panic recovery from TSimpleServer. Thrift shouldn't catch panics caused by caller-defined RPC handlers.
Client: go
This closes#1906.
Update most dependencies to their latest versions, replace findbugs with
spotbugs as the former is dead and was replaced with the latter.
Fixes THRIFT-4937.
Client: java
Client: Build system
Patch: Jens Geyer
This closes#1894
The patch contains a modified version of tar.m4. The --hard-dereference option prevents from a situation, where symlinks (used in the compiler/src subtree) get converted into hard links.
When the socket is closed (EOF of the inputstream), currently
TIOStreamTransport throws an TTransportException without message,
this is sometimes confusing for people maintaining a thrift server
(eg. apache hive).
Client: java
This closes#1876.
Client: go
This is the second part of THRIFT-4914, which handles the client writing
part in the requests (client -> server direction).
In TStandardClient, when the context has write headers set, and the
protocol is THeaderProtocol, automatically extract all headers from the
context object and set to THeaderProtocol to send over the wire.
Client code can set headers into the context object by using the helper
functions in header_context.go.
Note that we have separated keys for read and write header key list, so
that for code that's both a server and a client (example: a server that
calls other upstream thrift servers), they don't automatically forward
all headers to their upstream servers, and need to explicitly set which
headers to forward.
In order to make auto forwarding easier, also add SetForwardHeaders
function to TSimpleServer, which will help the users to auto forward
selected headers.
This closes#1845.
Client: go
This is the first part of THRIFT-4914, which handles the server reading
part in the requests (client -> server direction).
In TSimpleServer, when the protocol is THeaderProtocol automatically
add all present headers into the context object before passing
it to processor, so the processor code can access headers from the
context directly by using the new helper functions added in
header_context.go.
This closes#1840.
Client: go
Previously the library didn't check against double wrapping, so when
NewTSimpleServerN was used with both THeaderTransportFactory and
THeaderProtocolFactory, inside THeaderProtocolFactory the transport
was double wrapped with THeaderTransport.
Worse, the transport still appeared to work, because THeaderTransport
is backwards compatible with TBinaryProtocol and TCompactProtocol
so the outer layer of THeaderTransport wrapper (the one directly accessible
from the protocol) would assume the client doesn't support THeader and
fallback. So when double wrapping happened, it appeared like everything
was fine, except you couldn't get the headers from the protocol (because
they were in the inner THeaderTransport, not the outer one that's directly
accessible from the protocol), making it very hard to debug.
This commit adds protection against such double wrapping.
This closes#1839.
Two fixes here:
1. Additional logic to properly catch and handle TTransportException.
Currently, T(SASL)TransportException gets caught and handled in
the wrong catch-block.
2. The fix for THRIFT-3769 mutes _all_ TTransportExceptions in TThreadPoolServer.
This might mute legitimate failures. The intent of THRIFT-3769 (and
THRIFT-2268) was to mute the noise caused by TTransportException.END_OF_FILE.
This commit lets legitimate failures to be bubbled upwards.
Due to the way SSL layers on top of sockets, it was possible
to complete a connection and then have the server close it.
This would happen if the client is not checking certificates
but the server is. The TSSLSocket unit test was enhanced to
do a read and a write as well as just connecting to ensure a
more complete test.
The TSocket read() and write() calls were leaking OSError,
socker.error, and ssl.Error exceptions. These cases are now
wrapped into a TTransportException of the appropriate type,
and the original exception is added as an argument named inner.