This is the fourth and final part of THRIFT-4914, which handles the
client reading part in the response (server -> client direction).
Client: go
This closes#1926.
Fix a bug where remote.go client fails to compile when services
extend other services and the parent service has a function that
needs a container for its arguments.
Client:go
This closes#1925.
This is the third part of THRIFT-4914, which handles the server writing
part in the response (server -> client direction).
Define a new type, TResponseHelper, which only contains THeader related
functions for now, but can be extended for other functions in the
future.
In TSimpleServer, inject a TResponseHelper into the context object
passed into the handler functions. Handler function code could retrieve
the injected TResponseHelper to set headers to be written to the client.
Client: go
This closes#1923.
TCompactProtocol (which is used by THeaderTransport to read headers)
could wrap the underlying error with TProtocolException, which breaks
err == io.EOF test in some cases.
Client: go
This closes#1922.
This is a different approach to take THRIFT-4984: Instead of checking
EOF errors in place, handle them in a consolidated, deferred function.
Also improve test error messages.
Client: go
This closes#1907.
Client: Python
Patch: Kevin Wojniak
This closes#1912
Fixes MSVC warning seen in logs:
> [00:11:03] src\ext/protocol.tcc(177): warning C4101: 'ex': unreferenced
> local variable [C:\projects\build\MSVC2015\x86\lib\py\python_build.vcxproj]
- 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.
In TThreadPoolServer, threads are blocking in io with open sockets,
as long as clients don't close the connection, server threads are
never stopped even after a shutdown is called on server (because
they are blocked waiting for io).
To be able to stop all server threads properly, server should
proactively close sockets once a shutdown is initiated.
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.
- Include rebar3 in docker image so erlang builds in CI
- Include the correct path in docker image so rust builds in CI
- Updated common lisp (sbcl) to 1.5.3 in docker image
- Updated dlang to 2.087.0 in docker image
- Updated dart to 2.0.0 in xenial docker image
- Updated dart to 2.4.0 in bionic docker image
- Updated erlang to 22.0 in docker image
- Updated openjdk to 11.0.3 in docker image
- Updated node.js to 10.16 in docker image
- Updated rust to 1.34.0 in xenial docker image
- Updated rust to 1.35.0 in bionic docker image
THRIFT-4905: Disable hanging experimental dlang async ssl test
Client: go
Implement THeaderTransport and THeaderProtocol, with support of:
* clients:
- headers
- framedBinary
- unframedBinary
- framedCompact
- unframedCompact
* transforms:
- none
- zlib
* info types:
- key_value
* wrapped protocols:
- TBinary
- TCompact
The support list is in general on par of the THeader implementation in
the python library.
The cross-test passes, except ones related to cpp/nodejs http transport,
which were also failing for non-theader protocols.
This change also fixes two bugs:
1. A small issue in test/go/src/bin/testserver/main.go
2. A bug in TFrameTransport go implementation
Client: php
CURLOPT_TIMEOUT requires a long [0], so it seems that small values
like 0.2 are being rounded to 0, resulting in a lack of any timeout.
This change uses CURLOPT_TIMEOUT_MS, which the PHP documentation
says was "added in cURL 7.16.2. Available since PHP 5.2.3."
[0] https://curl.haxx.se/libcurl/c/CURLOPT_TIMEOUT.html