Commit Graph

3856 Commits

Author SHA1 Message Date
Márton Csordás
102428d35d THRIFT-5163 adds Q to exports for browserify
Client: NodeJS
Patch: Márton Csordás

This closes #2061
2020-04-03 02:19:11 +02:00
Márton Csordás
dfd6df7588 THRIFT-3356: handle undefined captureStackTrace
Client: nodejs
Patch: Márton Csordás

This closes #2082
2020-04-03 02:12:25 +02:00
zeshuai007
86396c6880 Add testcase for other condition judgment in the readJSONDouble function
Client: cpp
Patch: zeshuai007 <51382517@qq.com>

This closes #2080
2020-03-31 23:06:36 +02:00
Kanishth Karthik
8ec585793c THRIFT-4963: Fix deadlock in ThreadManager::Worker::run
Client: cpp
Patch: Kanishth Karthi

This closes #2070
2020-03-29 18:28:05 +02:00
panivko
dfe7f30070 THRIFT-5130 Use Apcu instead of APC
Client: PHP
Patch: Vladimir Panivko

This closes #2041
2020-03-27 21:44:05 +01:00
Jens Geyer
aeda987cc4 THRIFT-5146 Align Delphi to the test suite arguments rules (its "--switch=value", not "--switch value")
Client: Delphi
Patch: Jens Geyer
2020-03-22 15:30:37 +01:00
Jens Geyer
4a33b188f4 THRIFT-5145 Streamline --pipe and --named-pipe options in the code base
Client: Test suite
Patch: Jens Geyer

This closes #2065
2020-03-22 15:30:27 +01:00
zeshuai007
655f52590d Fix some compile warnings
Client: c_glib
Patch: zeshuai007 <51382517@qq.com>

This closes #2063
2020-03-22 13:22:37 +01:00
Mikel Blanchard
4b66a9d881 THRIFT-5133: Use ArrayPool when reading and writing strings to improve performance
Client: netstd
Patch: Mikel Blanchard

This closes #2057
2020-03-19 23:13:03 +01:00
Kevin Wojniak
dad2bf87da Fix several warnings in c_glib lib and incorrect error message
CLient: c_glib
Patch: Kevin Wojniak

This closes #1830
2020-03-15 12:20:08 +01:00
Alexander Edge
b013dc004a THRIFT-5121: Fix inverted logic when testing message type
Client: Swift
Patch: Alexander Edge

This closes #2036
2020-03-14 15:41:12 +01:00
Jano Svitok
2e11577477 THRIFT-5111: Upgrade rust to 1.36.0
Client: Rust
Patch: Jano Svitok

This closes #2050

Also contains portions of THRIFT-4547: Upgrade Swift in docker to 5.1.4
Client: Swift
Patch: Jano Svitok

Linux version 4.2.0 does not have FileHandle.acceptConnectionInBackgroundAndNotify()
implemented. We need at least 5.1 for TSocketServer to run in docker.

In the meantime, URLRequest was moved to FoundationNetworking.
To keep compatibility with previous versions, conditional import is
used.
2020-03-07 11:12:13 +01:00
Nik Clayton
e791760098 THRIFT-5131: Require >= 1.1.4 of integer-encoding dependency
Client: Rust
Patch: Nik Clayton

This closes #2045

Versions 1.1.0 - 1.1.3 of the integer-encoding crate had a bug where
numbers larger than 0x4000_0000_0000_0000 would cause a panic during
decoding.

Add a test to be sure that numbers up to i64::maxvalue() encode and
decode successfully.
2020-03-07 10:59:24 +01:00
Jens Geyer
1b7b00cde9 CI broken, reverting following PRs
reverted https://github.com/apache/thrift/pull/2025
reverted https://github.com/apache/thrift/pull/2026
Reverted https://github.com/apache/thrift/pull/2021
2020-02-28 19:20:27 +01:00
Jens Geyer
56700e469d THRIFT-4982 Remove deprecated C# bindings from the code base
Client: csharp
Patch: Jens Geyer

This closes #2027
2020-02-28 19:18:34 +01:00
Jens Geyer
4903d18fca THRIFT-5123 add possibility to query HTTP status code with WinHTTP
Client: delphi
Patch: Jens Geyer
2020-02-27 20:37:50 +01:00
Jens Geyer
aec555aac8 make dist fails due to CMakeList.txt files missing from the generated tarball 2020-02-26 22:14:12 +01:00
Mario Emmenlauer
b7b02afcd8 THRIFT-5115 PR #2022 Updated gradle to 6.2 broke CI
Client: java
Patch: Mario Emmenlauer

This closes #2031

Downgraded gradle to 5.6.4 after problems with 6.x in AS3
2020-02-25 23:21:57 +01:00
Alexander Edge
4b475af694 THRIFT-5084: Multiplexed processor in Swift – explicit return statements
Client: swift
Patch: Alexander Edge

This closes #2028
2020-02-24 19:00:49 +01:00
Mario Emmenlauer
66d110bcce THRIFT-5109 Misc Cmake build improvements
Patch: Mario Emmenlauer

This closes #2017
This closes #2018
This closes #2019

- build/cmake/DefineInstallationPaths.cmake: fixed the library path
- build/cmake/ThriftMacros.cmake: do not enforce debug suffix 'd'
- lib/java/CMakeLists.txt: allow to override JAVA_INSTALL_DIR
2020-02-23 15:12:19 +01:00
Mario Emmenlauer
b70dc1e61c Updated gradle to 6.2
Client: java
Patch: Mario Emmenlauer

This closes #2022
2020-02-23 14:58:10 +01:00
Mario Emmenlauer
f8b3698ab4 Updated Javascript dependencies
Client: js
Patch: Mario Emmenlauer

This closes #2023
2020-02-23 14:57:59 +01:00
Mario Emmenlauer
61d502075b THRIFT-5109 Misc Cmake build improvements
Patch: Mario Emmenlauer

This closes #2026
This closes #2025
This closes #2021
2020-02-23 14:51:48 +01:00
Mario Emmenlauer
f5a9a30e34 THRIFT-5110 Added a number of required libs for using static OpenSSL
Client: cpp
Patch: Mario Emmenlauer

This closes #2020
2020-02-23 14:50:30 +01:00
Alexander Edge
a89036c8c3 THRIFT-5084: Multiplexed processor in Swift
Client: Swift
Patch: Alexander Edge

This closes #2002
2020-02-21 21:57:37 +01:00
Kengo Seki
f0c761e171 THRIFT-5059: Add cross tests for TZlibTransport in D
Client: D
Patch: Kengo Seki

This closes #1977
2020-02-21 21:41:27 +01:00
wangyunjian
ea4a086757 THRIFT-5102: Fix memory leak in thrift_simple_server_serve()
Client: c_glib
Patch: wangyunjian

This closes #2012

Signed-off-by: wangyunjian <wangyunjian@huawei.com>
2020-02-21 21:35:39 +01:00
wangyunjian
bd26d38569 THRIFT-5094: Fix memory leak in thrift_server_set_property()
Client: c_glib
Patch: wangyunjian

This closes #2008

Signed-off-by: wangyunjian <wangyunjian@huawei.com>
2020-02-21 21:25:45 +01:00
wangyunjian
d8480c9ac1 THRIFT-5101: Return NULL install of FALSE for thrift_server_socket_accept()
Client: c_glib
Patch: wangyunjian

This closes #2011

Signed-off-by: wangyunjian <wangyunjian@huawei.com>
2020-02-21 21:15:29 +01:00
Jeffrey Han
7b712f42d7 THRIFT-5106: Fix various Lua library and compiler issues
Client: lua
Patch: Jeffrey Han

This closes #2014
2020-02-21 21:08:19 +01:00
Jens Geyer
222362cc70 THRIFT-5095 ToString() should print entire structure, not just the top-level data
Client: netstd
Patch: Jens Geyer

This closes #2009
2020-02-16 13:19:43 +01:00
Tobias Mayer
c8e46cf861 THRIFT-5097: Fix exported version in cmake module
Patch: Tobias Mayer

This closes #2010
2020-02-16 13:18:24 +01:00
Renan I. Del Valle
aa9e7e8f59 THRIFT-5092: Return an error instead of causing a panic when attempting to write to a closed client.
Client: go
Patch: Renan I. Del Valle

This closes #2005
2020-02-13 22:42:14 +01:00
Jens Geyer
b012318fc8 THRIFT-5088 Memory leak in TWinHttpTransport
Client: Delphi
Patch: Jens Geyer
2020-02-12 22:40:42 +01:00
Gaurav Singh
77c4afae16 (no ticket) Propagate exception instead of rethrowing
Client: cpp
Patch: Gaurav Singh

This closes #1999
2020-02-06 23:06:07 +01:00
Paulo Neves
f049ff374d THRIFT-5083 Reset context on new messages.
Client: netstd
Patch: Paulo Neves

This closes #
2020-02-05 21:40:16 +01:00
Kengo Seki
cb4c31a072 THRIFT-5050 Fix MemoryBuffer.pm to raise a proper exception if no data is available
Client: perl
Patch: Kengo Seki

This closes #1967
2020-01-28 23:27:48 +01:00
Nick Collier
e56f717b7f THRIFT-5078 Handle named pipe clients quickly disconnecting
Client: C++
Patch: Nick Collier

This closes #1964
2020-01-28 23:20:40 +01:00
Sam De Roeck
436bce3321 (no ticket) Gracefully terminate the connection handling loop when encountering EOF on the transport layer
Client: Rust
Patch: Sam De Roeck

This closes #1928
2020-01-28 22:47:55 +01:00
Cameron Rollheiser
3a2a44bb51 Remove non-required JS dependencies
These dependencies are not needed at runtime.

Client: js
2020-01-21 17:02:22 +00:00
JackBoosY
829b7d330d Add vcpkg installation instructions
Patch: JackBoosY, edited by JensG

This closes #1986
2020-01-19 23:00:32 +01:00
Kengo Seki
c97e6aa860 THRIFT-5060: Add cross tests for TZlibTransport in Java
Client: Java
Patch: Kengo Seki

This closes #1978
2020-01-19 22:26:09 +01:00
Yuxuan 'fishy' Wang
397645ac24 THRIFT-5069: Make TDeserializer resource pool friendly
Client: go

This change improves performance when using TDeserializer with a
resource pool. See https://issues.apache.org/jira/browse/THRIFT-5069 for
more context.

Also add TSerializerPool and TDeserializerPool, which are thread-safe
versions of TSerializer and TDeserializer. Benchmark result shows that
they are both faster and use less memory than the plain version:

    $ go test -bench Serializer -benchmem
    goos: darwin
    goarch: amd64
    BenchmarkSerializer/baseline-8            577558              1930 ns/op             512 B/op          6 allocs/op
    BenchmarkSerializer/plain-8               452712              2638 ns/op            2976 B/op         16 allocs/op
    BenchmarkSerializer/pool-8                591698              2032 ns/op             512 B/op          6 allocs/op
    PASS
2020-01-18 20:55:51 +00:00
D. Can Celasun
70c4e7a7c7
Use HTTPS for repo1.maven.org
Upstream no longer supports plain HTTP as of today [1].

[1] https://support.sonatype.com/hc/en-us/articles/360041287334
2020-01-15 21:13:50 +00:00
Kengo Seki
45a94594ff THRIFT-5061: Pin Ruby's rack version to 2.0.8
Client: ruby
Patch: Kengo Seki

This closes #1980
2020-01-11 12:57:53 +01:00
Eugen
30ac2598e8 THRIFT-5003: Websocket Connection in Browsers with nodejs code
* changed this to self in forEach callback

* updated minimum node version to 8.16.2 (Maintenance LTS until December 2019)
changed ws_connection.js to work in the browser, with isomorphic-ws
added exports for `wsConnection`, `createWSConnection`, `createWSClient`

* added exports for WSConnection to browser.js

* extended the sample of nodejs code in the browser with webpack

* tested and updated node version to LTS 10.18.0 Dubnium
discussion based: https://github.com/apache/thrift/pull/1927#discussion_r358140463
2020-01-07 14:28:45 +00:00
Allen George
6e443789e9
Merge pull request #1919 from mpajkowski/to_socket_addrs
THRIFT-4995 Use `ToSocketAddrs` for expressing network addresses
2019-12-14 09:52:36 -05:00
Duru Can Celasun
b374ce3555
THRIFT-5046: Better struct tag overrides
Custom go.tag in an IDL no longer removes the existing "db" and "json"
tags but can override them.

This allows us to change default tags in the future without affecting
user defined ones.

Client: go

This closes #1963.
2019-12-13 13:10:23 +00:00
Kevin Wojniak
0ebf3ce99d Fix uint64_t to size_t conversion warning
Fixes an MSVC warning with an explicit cast.

Client: cpp
2019-12-12 23:42:00 +00:00
Duru Can Celasun
dfae5d7f4a
THRIFT-4252: Close sockets when shut down server (#1905)
* THRIFT-4252: Close sockets when shut down server

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.

* Fix indentation

Use white space for indentation instead of tabulation.
2019-12-12 23:34:48 +00:00
Jens Geyer
6e2a6983ec THRIFT-5048 EnumUtils<T>.ToString() throws for elements not known to the receiving end [ci skip]
Client: Delphi
Patch: Jens Geyer
2019-12-13 00:33:46 +01:00
Anton Golub
cf95fef9b8 THRIFT-5029: Fix Node.js lib entry point
Client: js
2019-12-12 22:30:07 +00:00
Elvis Pranskevichus
9c43962da8 Revert "Revert "THRIFT-4002: Make generated exception classes immutable by default""
This reverts commit 1234ddf8a5.
2019-12-12 13:50:42 +00:00
Elvis Pranskevichus
9320f891d7 Revert "Revert "Remove unnecessary TException.message hack""
This reverts commit 3d9f50d617.
2019-12-12 13:50:42 +00:00
Qinghui Xu
6e023df1de THRIFT-4889 Nonblocking server with sasl support
Client: Java
Patch: Qinghui Xu

This closes #1892
2019-12-10 23:57:35 +01:00
Qinghui Xu
3a0e1fd356 THRIFT-5008: Improve TSaslTransport logging
Client: Java
Patch: Qinghui Xu

This closes #1931
2019-12-10 23:25:15 +01:00
D. Can Celasun
3d9f50d617
Revert "Remove unnecessary TException.message hack"
This reverts commit 45a9827f0f.
2019-12-10 22:13:19 +00:00
D. Can Celasun
1234ddf8a5
Revert "THRIFT-4002: Make generated exception classes immutable by default"
This reverts commit b40f5c227f.
2019-12-10 22:13:06 +00:00
Elvis Pranskevichus
b40f5c227f
THRIFT-4002: Make generated exception classes immutable by default
Currently, the generated exception classes are not hashable under
Python 3 because of the generated `__eq__` method.  Exception objects
are generally expected to be hashable by the Python standard library.
Post-construction mutation of an exception object seems like a very
unlikely case, so enable hashing for all exceptions by making them
immutable by default.  This also adds a way to opt-out of immutability
by setting the `python.immutable` annotation to `"false"`.
2019-12-10 20:44:24 +00:00
Elvis Pranskevichus
45a9827f0f
Remove unnecessary TException.message hack
Thrift attempts to work-around the Python 2.7 DeprecationWarning
around `BaseException.message` by using a property.  This hack is
unnecessary since `message` is _also_ written as a regular attribute in
the `TException` constructor (and would be in any of its children),
hence the `BaseException_get_message()` wouldn't even be called.

This hack also stands in the way of making exception instances
immutable (which is a prerequisute to fixing THRIFT-4002).
2019-12-10 20:44:22 +00:00
Jens Geyer
ffb97e105c THRIFT-4990 Upgrade to .NET Core 3.1 (LTS)
Client: netstd
Patch: Jens Geyer

This closes #1961
2019-12-07 08:47:32 +01:00
Jens Geyer
e780855d33 THRIFT-5044 Improve serialization support for TApplicationExceptions and custom exceptions
Client: Delphi
Patch: Jens Geyer

This closes #1960
2019-12-05 09:03:10 +01:00
Julian Tescher
9c6c6bf81a THRIFT-5043 Make TBufferChannel clonable
Client: Rust
Patch: Julian Tescher

This closes #1956

It is useful for `TBufferChannel` to be `Clone` so that you can use it to read bytes that were written by a client for use cases like testing or sending over alternative transports like UDP.
2019-12-02 21:03:35 +01:00
Marcin Pajkowski
b34680f01a THRIFT-4915 Fix encoding/decoding doubles in TCompactProtocol
Client: Rust
Patch: Marcin Pajkowski

This closes #1957
2019-12-02 20:51:14 +01:00
Marcin Pajkowski
c63084193a THRIFT-5042 Fix failing tests
Client: Rust
Patch: Marcin Pajkowski

This closes #1958
2019-12-02 19:29:38 +01:00
Marcin Pajkowski
98ce2c8f2b THRIFT-4995 Use ToSocketAddrs for net addresses 2019-11-29 10:27:26 +01:00
Jens Geyer
a019cda66c THRIFT-5012 Centralize configuration aspects into a commonly used configuration object [ci skip]
Client: Delphi
Patch: Jens Geyer

This closes #1955
2019-11-28 00:52:47 +01:00
Jens Geyer
c140bb90b0 THRIFT-5036 buffered transport over sockets may run into unexpected timeouts [ci skip]
Client: Delphi
Patch: Jens Geyer
2019-11-27 22:24:12 +01:00
wineandcheeze
bf2cad9cfa THRIFT-5031: Fix TIOStreamTransport javadoc
Clarify input/output only transport.

Client: java

This closes #1948.
2019-11-25 21:40:52 +00:00
Andy Seaborne
622937162a THRIFT-5022: Fix TIOStreamTransport.isOpen for input or output only use
Client: java

This closes #1942.
2019-11-25 09:58:52 +00:00
Jens Geyer
5080645cb0 THRIFT-5027 Implement remaining read bytes checks
Client: netstd
Patch: Jens Geyer

This closes #1946
2019-11-23 22:40:53 +01:00
zembord
9d958a3caf THRIFT-5010 BinaryPrimitives.Read/WriteInt32BigEndian should be used to convert to/from network byte order
Client: netstd
Patch: Edward Zhuravlov

This closes #1944
2019-11-23 22:24:52 +01:00
Jens Geyer
eacd1d48c8 THRIFT-5021 Implement MAX_MESSAGE_SIZE and centralize limits into a TConfiguration class
Client: netstd
Patch: Jens Geyer

This closes #1943
2019-11-23 01:15:45 +01:00
Grégoire Seux
8ae80a7f84 THRIFT-4999: Raise proper exception on transport error
Client: ruby
Patch: Grégoire Seux

This closes #1924

Before this patch, any error on the http layer was ignored and usually
seen by the user as ProtocolException instead of TransportException
2019-11-21 22:43:21 +01:00
Jens Geyer
261cad3417 THRIFT-5020 Refactoring & minor fixes for netstd library
Client: netstd
Patch: Jens Geyer

This closes #1941
2019-11-21 22:26:09 +01:00
Duru Can Celasun
f4475ff76f
THRIFT-5019: Duplicate imports from multiple includes from a namespace
If a thrift file includes two files from the same namespace into a
separate file, the generated Go code has duplicate imports for that
namespace. This fixes that.

Client: go
2019-11-20 15:31:35 +00:00
Jens Geyer
225646b554 THRIFT-4862 C++ TBinaryProtocol crashes on port scan
Client: cpp
Patch: Michael Patrick

This closes #1939
2019-11-20 03:04:00 +01:00
Jens Geyer
528a0f0731 THRIFT-5015 WinHTTP QueryDataAvailable cannot be used to retrieve total response size
Client: Delphi
Patch: Jens Geyer
2019-11-18 20:17:03 +01:00
Jens Geyer
41f47aff7c THRIFT-5007 Implement MAX_MESSAGE_SIZE and remaining read bytes control
Client: Delphi
Patch: Jens Geyer

This closes #1932
2019-11-15 23:27:20 +01:00
Jens Geyer
ed99455e2e THRIFT-5009 Serializer implemtation lacks support for layered transports
Client: Delphi
Patch: Jens Geyer
2019-11-14 22:17:39 +01:00
Jens Geyer
2646bd65b5 THRIFT-5006 Implement DEFAULT_MAX_LENGTH at TFramedTransport
Client: Delphi
Patch: Jens Geyer
2019-11-13 09:34:58 +01:00
Jens Geyer
fad7fd3e5a THRIFT-5005 Refactoring of the Delphi libs [ci skip]
Client: Delphi
Patch: Jens Geyer
2019-11-13 09:34:58 +01:00
Jens Geyer
9f11c1e545 THRIFT-5004 Make exception implementations more consistent [ci skip]
Client: Delphi
Patch: Jens Geyer
2019-11-13 09:34:57 +01:00
Yuxuan 'fishy' Wang
24fa9d0728 THRIFT-4914: Add GetResponseHeadersFromClient helper function
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.
2019-11-09 22:21:09 +00:00
John Boiles
59694a796f THRIFT-5002: Fix argument containers for inherited functions
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.
2019-11-09 19:22:26 +00:00
Yuxuan 'fishy' Wang
4c27181a06 THRIFT-4914: Add TResponseHelper
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.
2019-11-09 19:20:09 +00:00
zembord
50caa4de84 THRIFT-4990: Upgrade to .NET Core 3.0
Client: netstsd
Patch: Edward Zhuravlov

This closes #1921
2019-11-08 19:24:59 +01:00
Yuxuan 'fishy' Wang
963812ae62 THRIFT-4984: Handle wrapped io.EOF errors
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.
2019-11-08 09:02:00 +00:00
Kevin Wojniak
596e25f9b0 Fix unknown pragma warnings on mingw
Client: cpp
Patch: Kevin Wojniak

This closes #1917

These pragmas are only valid for MSVC. Fixes warnings found in the logs:

> In file included from C:\projects\thrift\lib\cpp\test\processor\ProcessorTest.cpp:40:
731C:\projects\thrift\lib\cpp\test\processor\Handlers.h:143: warning: ignoring #pragma warning  [-Wunknown-pragmas]
732  143 |   #pragma warning( push )
733      |
734C:\projects\thrift\lib\cpp\test\processor\Handlers.h:144: warning: ignoring #pragma warning  [-Wunknown-pragmas]
735  144 |   #pragma warning (disable : 4250 ) //inheriting methods via dominance
736      |
737C:\projects\thrift\lib\cpp\test\processor\Handlers.h:172: warning: ignoring #pragma warning  [-Wunknown-pragmas]
738  172 |   #pragma warning( pop )
739      |
2019-11-06 01:11:55 +01:00
Yuxuan 'fishy' Wang
4653009035 THRIFT-4984: Ignore EOF errors in TSimpleServer, take 2
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.
2019-11-05 21:31:13 +00:00
Eugen Kandakov
f7b2197916 THRIFT-4994 changed this to self in forEach callback
Client: nodejs
Patch: Eugen Kandakov

This closes #1918
2019-11-04 22:00:24 +01:00
Qinghui Xu
24045b7211 Fix indentation
Use white space for indentation instead of tabulation.
2019-11-04 10:21:47 +01:00
xiongjieqing
a5b2bf5b0b THRIFT-4992 thrift lua TcompactProtocol bug fix #1881
Client: Lua
Patch: xiongjieqing <xiongjieqing@gmail.com>
2019-11-03 19:07:13 +01:00
Jens Geyer
c5fadee94a Revert "thrift lua TcompactProtocol bug fix"
This reverts commit 3adb44aa26.
2019-11-03 19:07:04 +01:00
xiongjieqing
3adb44aa26 thrift lua TcompactProtocol bug fix 2019-11-03 18:59:39 +01:00
Kevin Wojniak
cf73b66cd8 Remove unused exception variable
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]
2019-11-03 18:42:11 +01:00
Kevin Wojniak
bc75467e44 Fix "thruth" typo
Client: Go
Patch: Kevin Wojniak

This closes #1911
2019-11-03 18:39:38 +01:00
Jens Geyer
43a93f1e6e fix typo in cmake
Patch: Jens Geyer

This closes #1910
2019-11-03 18:34:24 +01:00
Jens Geyer
ec439548c5 THRIFT-4990 Switch to .NET core 3.0
Client: netstsd
Patch: Jens Geyer

This closes #1909
2019-11-02 17:34:23 +01:00
Jens Geyer
9ea48f362a Fix PHP style errors (by means of phpcbf) [ci skip] 2019-11-02 12:24:12 +01:00
Yuxuan 'fishy' Wang
e4870a3571 THRIFT-4985: Refactor logging in Go library
- 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.
2019-10-24 21:23:30 +01:00
Yuxuan 'fishy' Wang
c03e2aa196 THRIFT-4984: Ignore EOF error in TSimpleServer ReadFrame call
EOF isn't an error that should be bubbled up to the 
caller and we are already ignoring other EOF errors in 
TSimpleServer.processRequest [0].

Client: go

This closes #1904.

[0]: cecee50308/lib/go/thrift/simple_server.go (L265-L266)
2019-10-23 21:43:09 +01:00
Qinghui Xu
9cb1c794cd THRIFT-4252: Close sockets when shut down server
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.
2019-10-23 20:45:33 +02:00
pengzhouhu
6e4c581fdd THRIFT-4949: Improve HTTP/1 server test case
Client: java

This closes #1886.
2019-10-21 15:21:11 +01:00
Jens Geyer
3f3567a114 THRIFT-4981 Remove deprecated netcore bindings from the code base
Client: netcore
Patch: Jens Geyer

This closes #1901
2019-10-20 16:21:29 +02:00
Jens Geyer
616df98f00 fix veralign.sh and bump version (again) 2019-10-20 00:12:14 +02:00
D. Can Celasun
76fa8c9a81
Update Java dependencies
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
2019-10-18 15:15:45 +01:00
pengzhouhu
9f0548e05f THRIFT-4952 Modified ssl_read feedback value break all the time error.
Client: c_glib
Patch: pengzhouhu <pengzhouhu@huawei.com>

This closes #1869
2019-10-18 00:26:47 +02:00
Jens Geyer
5fe31ea7d7 bump version 2019-10-17 23:51:36 +02:00
Jens Geyer
4286054d3d Merge branch '0.13.0' 2019-10-17 23:49:41 +02:00
Jens Geyer
b75e88a33d FIX netstd assembly version 2019-10-17 23:47:40 +02:00
Jens Geyer
dd14e869ce Fix PHP style errors (by means of phpcbf) 2019-10-17 20:54:34 +02:00
Jens Geyer
e02559fd46 bump version
This closes #1899
2019-10-17 20:31:24 +02:00
Mario Emmenlauer
0f14e2f3f6 THRIFT-4977: Allow loading OpenSSL certificates from memory
Client: cpp

This closes #1860.
2019-10-15 10:25:10 +01:00
wineandcheeze
ab89b8b40e THRIFT-2530: Fix TIOStreamTransport#isOpen
isOpen should return false when close is called.

Client: java

This closes #1878.
2019-10-10 12:50:50 +01:00
Jens Geyer
224b43ec7e THRIFT-4874: Thrift 0.12.0 Source Distribution (.tar.gz) Contains Hardlinks - Extract Fails
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.
2019-10-10 01:28:55 +02:00
wineandcheeze
904f5619a9 THRIFT-4858: Add error message to TTransportException
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.
2019-10-09 09:27:23 +01:00
pengzhouhu
a152a0ad88 THRIFT-4945: Fix non-standard log output
Client: java

This closes #1862.
2019-10-08 23:18:30 +01:00
HIRANO Satoshi
8098428901 Add Node.js example for browsers
Client: js

This closes #1864.
2019-10-08 23:06:30 +01:00
Ben Evans
dfa74bc99e Upgrade to Gradle 5.6.2
This closes #1882.
2019-10-08 22:54:08 +01:00
Kengo Seki
5a8cd9d1fb THRIFT-4971: Fix lib/rb/spec/union_spec.rb so that CI succeeds
Client: Ruby
Patch: Kengo Seki

This closes #1891
2019-10-06 12:17:19 +02:00
Allen George
786c019476
Merge pull request #1870 from dbcfd/thrift-4953
THRIFT-4953: Missing Field Identifiers
2019-09-23 08:41:30 -04:00
pengzhouhu
2d03630b61 THRIFT-4950 fix bind print error and Macro call errors thrift_server_socket
Client: C_glib
Patch: pengzhouhu

This closes #1867
2019-09-22 11:38:29 +02:00
Guillaume Blanc
5e9203b2b2 THRIFT-4962 Fix deadlock in TimerManager::stop
Client: cpp
Author: Guillaume Blanc

This closes #1877
2019-09-21 14:40:15 +02:00
Ewan Higgs
b3745eea10 THRIFT-4932: Using a default string on a binary field results in invalid Java code.
Client: Java
Patch: Ewan Higgs

This closes #1875.
2019-09-20 16:15:04 +01:00
Danny Browning
77d96c18c3 THRIFT-4960 bare trait (dyn) warnings
Client: Rust
Patch: Danny Browning

This closes #1851
2019-09-11 23:35:26 +02:00
Vladimir Arkhipov
f1bc6aef7d Fix typo in xml comment
Client: C#
Patch: Vladimir Arkhipov

This closes #1874
2019-09-11 23:11:46 +02:00
Jens Geyer
b7bd211699 Prevent "Log file size too large" messages during CI tests 2019-09-11 22:52:40 +02:00
Jens Geyer
8ff8abd6f2 THRIFT-4957 testSanePartsOfCompactProtoTestStruct FAILED
Client: Java
Patch: Jens Geyer

This closes #1873
2019-09-11 00:41:49 +02:00
Danny Browning
236032a8af THRIFT-4953: Missing Field Identifiers
When identifiers are not specified, negative id will be converted to a valid
rust identifier.
2019-09-06 10:40:53 -06:00
Danny Browning
942bd8403b Bare Trait Warnings
Fixes bare trait (dyn) warnings in the library as well as generated code.
2019-09-06 10:28:24 -06:00
Jens Geyer
a715f701bf THRIFT-4944 Field IDs > 255 fail with compact protocol
Cliwent: Delphi
Patch: Jens Geyer
2019-08-28 22:56:35 +02:00
Jens Geyer
a4fc3d42e9 THRIFT-4907 strong named assemblies wanted
Client: netstd
Patch: Jens Geyer

This closes #1854
2019-08-25 14:04:58 +02:00
Alex-Rud
693e19cf48 THRIFT-4939 TThriftListImpl<T>.Sort() does not use comparer
Client: Delphi
Patch: Alex-Rud <Alex.van.rudik@gmail.com>
2019-08-25 00:20:55 +02:00
Issacpeng
81f5e10ec4 THRIFT-4865:Replace expired Charsets with StandardCharsets
Client: Java
Patch: Issacpeng <pengzhouhu@huawei.com>

This closes #1846
2019-08-24 16:13:34 +02:00
pengzhouhu
2ff4b13df4 THRIFT-4936 add depth limit type exception description
Client: C++
Patch: pengzhouhu

This closes #1852
2019-08-22 22:43:15 +02:00
Jens Geyer
9cf37be1f1 THRIFT-4919 THttpTransport.cs (netstd) and THttpClientTransport (netcore) have bad timeout code
Patch: Jens Geyer

This closes #1847
2019-08-20 21:28:38 +02:00
Yuxuan 'fishy' Wang
26ef904600 THRIFT-4914: Send context THeaders for client writes
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.
2019-08-19 08:18:22 +01:00
Yuxuan 'fishy' Wang
b1002a71fb THRIFT-4914: Add THeader to context for server reads
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.
2019-08-05 21:03:02 +01:00
Yuxuan 'fishy' Wang
6ae2b189ef THRIFT-4612: Avoid double wrapping THeaderTransport
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.
2019-08-05 12:59:08 +01:00
Craig Wickesser
bb311a772e Add pointer helpers for missing types 2019-07-27 16:48:57 -04:00
Yuxuan 'fishy' Wang
ebb6b2ed68 THRIFT-4612: Add THeaderTransportFactory to go library
Client: go

This was supposed to be in 4d46c11, but was forgotten.

Closes #1832.
2019-07-24 16:42:06 +01:00
guozhu cheng
4c847372eb THRIFT-4908: remove reader&writer in Golang's TBinaryProtocol
Client: go

This closes #1831.
2019-07-15 12:46:25 +01:00
Beluga Behr
286eee16b1 THRIFT-4849: Do not Ignore InterruptedException 2019-07-08 13:07:04 -04:00
fmalaguti
234e80e1b9 THRIFT-4844: createConnection ignores connect_timeout option 2019-07-08 13:06:21 -04:00
James E. King III
178891f7d6 THRIFT-4805: Fixed readme files 2019-07-08 09:56:59 -04:00
Mithun RK
c35ed736d2 THRIFT-4805: Suppress excessive logging of SASL TTransportExceptions in case of END_OF_FILE
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.
2019-07-08 09:56:59 -04:00
Antoine Cœur
08a6eb6e1f THRIFT-4902: Swift 4 and 5 compatibility (#1827) 2019-07-08 06:42:09 -04:00
James E. King III
3131fe975c THRIFT-4904: Fix python unit test errors and exception escapes
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.
2019-07-07 12:16:52 -04:00
James E. King III
93ff9b0053 Update language levels, fix erlang and rust in CI
- 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
2019-07-07 12:16:52 -04:00
Shaoyu Zhang
1a2dee60b4 Use THRIFT_WRITE instead of ::write in TFileTransport.cpp 2019-07-01 20:15:03 -04:00
soroshsabz
6a61dfabbf THRIFT-4830: Add to_string helper function for cpp generator (#1765) 2019-07-01 20:13:54 -04:00
Gonzalo Aguilar Delgado
9b49c96a6a THRIFT-4842 - Fix memory leak on set property c_glib (#1773) 2019-07-01 20:13:09 -04:00
Kevin Wojniak
6c847d2d02 THRIFT-4878 - [c_glib] add unix domain socket support to ThriftSocket (#1807) 2019-07-01 20:11:56 -04:00
Kevin Wojniak
a392566e9b THRIFT-4896 - prevent cpp and c_glib include directories from leaking into other targets (#1821)
- enable the automake `nostdinc` option
- fix up include paths
2019-07-01 14:07:45 -04:00
John Boiles
d9019fc5a4 THRIFT-4797: Fix import collisions in Go
Client: go

This closes #1811.
2019-06-29 07:07:10 +01:00
Jens Geyer
bd1a273ab7 THRIFT-4898 Pipe write operations across a network are limited to 65,535 bytes per write.
Client: netstd
Patch: Jens Geyer

This closes #1823
2019-06-27 21:30:25 +02:00
Jens Geyer
62238d1a6c THRIFT-4886 More detailed error information for WinHTTP transport
Client: Delphi
Patch: Jens Geyer
2019-06-26 20:53:22 +02:00
Jens Geyer
1e808af7b3 THRIFT-4893 Enable automatic content encoding handling for gzip,deflate in the HTTP client
Client: netstd
Patch: Jens Geyer

This closes #1818
2019-06-22 10:27:57 +02:00
Jens Geyer
19505c3de3 THRIFT-4894 Enable automatic content encoding handling for gzip,deflate in the WinHTTP client
Client: Delphi
Patch: Jens Geyer
2019-06-22 01:03:55 +02:00
antbofh
95870f06cd THRIFT-4892: fixed data type conflict with simultaneous usage of bytes and str (#1804) 2019-06-21 15:33:55 -04:00
David Carlier
29ecfaba53 CPP generator test, catching exceptions by ref instead. 2019-06-21 07:30:13 -04:00
Mustafa Senol Cosar
3f0d444791 Implement episodic compilation for js code generation 2019-06-21 06:38:32 -04:00
Jens Geyer
433a649a36 THRIFT-4886 More detailed error information for WinHTTP transport
Client: Delphi
Patch: Jens Geyer
2019-06-19 23:32:19 +02:00
Yuxuan 'fishy' Wang
4d46c11244 THRIFT-4612: THeader support in go library
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
2019-06-19 22:52:24 +02:00
Kyle Smith
823474ec89 THRIFT-4848: Add ability to set Content-Type,Accept headers in HTTP client
Client: netstd
Patch: Kyle Smith

This closes #1801
2019-06-14 22:42:15 +02:00
Jens Geyer
19fdca82c2 THRIFT-4886 More detailed error information for WinHTTP transport
Client: Delphi
Patch: Jens Geyer
2019-06-12 22:09:58 +02:00
Jens Geyer
b342bd9a61 THRIFT-4884 Add serialisation performance test for Delphi
Client: Delphi
Patch: Jens Geyer
2019-06-07 22:31:26 +02:00
Jens Geyer
83ff753777 THRIFT-4882 Autodetect proxy settings with WinHTTP
Client: Delphi
Patch: Jens Geyer
2019-06-07 22:26:55 +02:00
Jens Geyer
47f6317336 THRIFT-4881 Allow TLS1.1 and TLS1.2 even when not configured as systemwide default
Client: Delphi
Patch: Jens Geyer
2019-06-07 22:26:53 +02:00
Jens Geyer
936944384f THRIFT-4879 general performance improvements for netstd library
Client: netstd
Patch: Jens Geyer

Removing obsolete (and finally incorrect) assertion.
2019-06-05 22:03:14 +02:00
Jens Geyer
5a17b13ebc THRIFT-4879 general performance improvements for netstd library
Client: netstd
Patch: Jens Geyer

This closes #1808
2019-06-04 22:31:58 +02:00
James E. King III
057bebc1c3 Merge branch '0.12.1' 2019-05-26 14:59:04 -04:00
timestee
370d7513f0 spelling mistake, perhaps (#1803) [ci skip 2019-05-20 07:20:42 -04:00
Henrik Tudborg
c035eca3c6 hotfix: clear the offline queue when once written 2019-05-14 14:26:48 -04:00
Jeremy Mikkola
79c2337705 THRIFT-4845: Stop ignoring small timeouts
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
2019-05-14 06:15:48 -04:00
James E. King III
b261f3c0f1 THRIFT-4857: [java] added a unit test for TField 2019-05-13 16:53:57 -04:00
Garret Wilson
6b6a8279ab THRIFT-4857: Made Java TField class hash code consistent with equals.
Client: java
2019-05-13 16:53:57 -04:00
Sergey Yelin
4ffe76351e THRIFT-4583: Switch to rebar3
Client: erl
2019-05-13 06:52:19 -04:00
Sergey Elin
ce32ed7012 Report error for abnormal server termination only
Client: erl
2019-05-12 07:08:07 -04:00
Jens Geyer
a5dbb011fd THRIFT-4864 CI fails at netstd
Client: netstd
Patch: Jens Geyer

This closes #1798
2019-05-11 18:46:48 +02:00
James E. King III
522f873e1e Update and fix js dependencies 2019-05-10 18:47:27 -04:00
Jens Geyer
85431d9c6a THRIFT-4862 better ToString() support for enums and container types
Client: Delphi
Patch: Jens Geyer
2019-05-10 22:49:20 +02:00
Jens Geyer
8f7487e108 THRIFT-4862 better ToString() support for enums and container types
Client: Delphi
Patch: Jens Geyer

This closes #1795
2019-05-10 00:39:30 +02:00
Jens Geyer
14a9a120a8 THRIFT-4863 better indication of WinHTTP errors
Client: Delphi
Patch: Jens Geyer
2019-05-10 00:20:25 +02:00
James E. King III
ee8caca54e THRIFT-4861: Set minimum boost to 1.56 and stop using deprecated boost predef endian header
Client: cpp
2019-05-04 21:52:29 -04:00
Jens Geyer
27d8387c49 THRIFT-4860 Allow changing "User-Agent"
Client: netstd
Patch: Jens Geyer
2019-05-04 12:22:47 +02:00
Park June Chul
8d554f503e THRIFT-4859 Enables changing 'UserAgent'
Client: C#
Patch: Park June Chul <pjc0247@naver.com>

This closes #1787
2019-05-04 12:13:11 +02:00
Albert Hives
65d5f84507 renamed TClientTransport.cs file to match its class name TTransport.cs
Client: netstd
Patch: Albert Hives <ahives@hotmail.com>

This closes #1784
2019-05-03 23:10:16 +02:00
Beluga Behr
cc13de4f87 THRIFT-4851: Remove All Calls To printStackTrace
Client: Java
Patch: Beluga Behr <dam6923@gmail.com>

This closes #1783
2019-05-03 22:58:53 +02:00
Jens Geyer
366cc3dee0 THRIFT-4854 oneway calls do not work over HTTP
Client: netstd
Patch: Jens Geyer

This closes #1790
2019-04-28 23:51:34 +02:00
Jens Geyer
8f327f24ee THRIFT-4853 TServerFramedTransport is now obsolete and can be removed
Client: netstd
Patch: Jens Geyer

This closes #1789
2019-04-28 00:31:57 +02:00
Jens Geyer
2ff952b0af THRIFT-4816 JSONTransports Context.WriteAsync/ReadAsync are badly named
Client: netstd
Patch: Jens Geyer

This closes #1779
2019-04-19 16:07:29 +02:00
Jens Geyer
e26269e7b3
Merge pull request #1781 from dbcfd/4536-rust-stable
THRIFT-4536: Rust 1.34.0
2019-04-19 02:15:17 +02:00
Jens Geyer
2135a361a5 THRIFT-4834 CI error at Haskell: Failed to load interface for 'Network' (#1780) 2019-04-16 10:27:03 -04:00
Danny Browning
181d900a39 THRIFT 4536: Rust 1.34.0
Update dockerfiles to use rust stable, call out required rust version in
breaking changes.
2019-04-15 09:55:04 -06:00
Jens Geyer
0223091b70 THRIFT-4841 THTTPTransport relies on activeX component
Client: Delphi
Patch: Jens Geyer

This closes #1778
2019-04-06 09:53:09 +02:00
Jens Geyer
c9b1e29bc9 THRIFT-4843 http:// and https:// schemes are switched in test client
Client: Delphi
Patch: Jens Geyer
2019-04-04 00:02:03 +02:00
Kyle Smith
7b94dd4221 THRIFT-4839: Remove embedded buffering/framed options from TCP transports
Client: netstd
Patch: Kyle Smith + minor changes by Jens Geyer

This closes #1770
2019-03-27 00:17:55 +01:00
Danny Browning
ddec431b4a TryFrom stable
TryFrom is now stable, so use that. Additionally re-export OrderedFloat since
it is used by the generated code. Relax dependencies to reduce downstream
conflicts.
2019-03-22 14:38:36 -04:00