summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Setup for Visual Studio 2019 + workarounds for some open tickets:Jens Geyer2021-02-107-18/+168
| | | | | | | - (NO TICKET) fix Haxe warning - Referenzdaten PerfTest Delphi und netstd - "custom build" added to version info - netstd nuget upgrades
* Revert "THRIFT-4982 Remove deprecated C# bindings from the code base"Jens Geyer2021-02-1098-0/+11932
| | | | Only compiler, test, lib and tutorial code.
* Consolidated gitignore & added missing EXTRA_DISTsJens Geyer2021-02-058-104/+115
|
* THRIFT-5274: Enforce Java 8 compatibilityChristopher Tubbs2021-02-042-0/+12
| | | | | | | | | | | | | | | | | Client: Java Patch: Christopher Tubbs This closes #2325 * Enforce Java 8 compatibility using the new `--release` flag introduced in JDK9, so that all generated bytecode follows Java 8 strict compatibility, even when building with newer JDK versions (9 or later) (this fixes NoSuchMethodError with ByteBuffer, and other potential incompatibilities in bytecode generation that would make the code unable to run on a Java 8 JRE) * Also strictly enforce the JDK version used to build the project by ensuring it is at least version 1.8, and will fail fast when building the Java libraries if this condition is not met.
* THRIFT-5297: Improve TThreadPoolServer Handling of Incoming ConnectionsDavid Mollitor2021-02-042-130/+64
| | | | | | | Client: Java Patch: David Mollitor This closes #2266
* THRIFT-5345: Allow the ServerContext to be Unwrapped Programmaticallybelugabehr2021-02-042-5/+46
| | | | Client: Java Patch: David Mollitor
* THRIFT-5343: TTlsSocketTransport does not resolve IPv4 addresses or validate ↵James Lacey2021-02-041-4/+5
| | | | | | | | | hostnames correctly Client: netstd Patch: James Lacey This closes #2322
* THRIFT-5337 Go set fields write improvementwangtieju2021-02-033-2/+357
| | | | | | | | | | | | | Client: go There is a duplicate elements check for set in writeFields* function, and it compares elements using reflect.DeepEqual which is expensive. It's much faster that generates a *Equals* function for set elements and call it in duplicate elements check, especially for nested struct element. Closes #2307.
* THRIFT-5237 Implement MAX_MESSAGE_SIZE and consolidate limits into a ↵Jens Geyer2021-02-032-21/+21
| | | | | | | | | TConfiguration class (cpp) Client: cpp Patch: Jens Geyer Fixes an issue introduced with that ticket
* THRIFT-5336 Add possibility to setup connection timeout in TCurlClientvladimir.panivko2021-01-241-0/+26
| | | | | | | Patch: Vladimir Panivko Client: php This closes #2306
* THRIFT-4914: Make TClient.Call to return the response metaYuxuan 'fishy' Wang2021-01-225-27/+27
| | | | | | | | | Client: go Make a breaking change so that TClient.Call returns the response meta, currently only contains headers but could be expanded in the future, and make a compiler change to compiler generated clients to take advantage of that and provide access to response metadata to users.
* THRIFT-5322: THeaderTransport protocol id fixYuxuan 'fishy' Wang2021-01-222-12/+29
| | | | | | | | | | | | | | Client: go This fixes a bug introduced in https://github.com/apache/thrift/pull/2296, that we mixed the preferred proto id and the detected proto id, which was a bad idea. This change separates them, so when we propagate TConfiguration, we only change the preferred one, which will only be used for new connections, and leave the detected one from existing connections untouched. Also add a test for it.
* THRIFT-5338: Remove lib/go/thrift/go.modYuxuan 'fishy' Wang2021-01-201-3/+0
| | | | | | | | Client: go Having it under a subdirectory has some unexpected consequences, so remove it for now. Another PR will be open up later to add it back to the root directory.
* THRIFT-5338: Raise minimal supported go version to 1.14.14Yuxuan 'fishy' Wang2021-01-2012-57/+63
| | | | | | | | | Client: go - Update Dockerfiles used by travis - Add go.mod file - Modify error handling code to take advantage of errors package updates in go1.13
* THRIFT-5326: Make PrependError more unwrap-ableYuxuan 'fishy' Wang2021-01-193-24/+50
| | | | | | | Client: go As a follow up to https://github.com/apache/thrift/pull/2298, make the error returned by PrependError unwrap-able in certain cases.
* THRIFT-5326: Expand TException interface in go libraryYuxuan 'fishy' Wang2021-01-179-25/+141
| | | | | | | | | | | | Client: go Add TExceptionType enum type, and add TExceptionType() TExceptionType function to TException definition. Also make TProtocolException unwrap-able.
* THRIFT-5322: Implement TConfiguration in Go libraryYuxuan 'fishy' Wang2021-01-1717-182/+1233
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Client: go Define TConfiguration following the spec, and also move the following configurations scattered around different TTransport/TProtocol into it: - connect and socket timeouts for TSocket and TSSLSocket - tls config for TSSLSocket - max frame size for TFramedTransport - strict read and strict write for TBinaryProtocol - proto id for THeaderTransport Also add TConfiguration support for the following and their factories: - THeaderTransport and THeaderProtocol - TBinaryProtocol - TCompactProtocol - TFramedTransport - TSocket - TSSLSocket Also define TConfigurationSetter interface for easier TConfiguration propagation between wrapped TTransports/TProtocols , and add implementations to the following for propagation (they don't use anything from TConfiguration themselves): - StreamTransport - TBufferedTransport - TDebugProtocol - TJSONProtocol - TSimpleJSONProtocol - TZlibTransport TConfigurationSetter are not implemented by the factories of the "propagation only" TTransports/TProtocols, if they have a factory. For those use cases, TTransportFactoryConf and TProtocolFactoryConf are provided to wrap a factory with the ability to propagate TConfiguration. Also add simple sanity check for TBinaryProtocol and TCompactProtocol's ReadString and ReadBinary functions. Currently it only report error if the header length is larger than MaxMessageSize configured in TConfiguration, for simplicity.
* THRIFT-5331: Py: make THeader subprotocol configurable (#2302)Neil Williams2021-01-042-7/+14
| | | | | Client: py This allows clients to choose which subprotocol (TBinary/TCompact) to frame with headers. The server will already accept either protocol and reply correctly.
* THRIFT-5325: Fix Lua library writeStructEnd() in TCompactProtocolJeffrey Han2020-12-221-1/+1
| | | | | | | Client: lua Patch: Jeffrey Han This closes #2297
* TServerSocket.cpp::isOpen(): Check that a domain socket file already existsMario Emmenlauer2020-12-191-0/+32
|
* THRIFT-5322: Guard against large string/binary lengths in GoYuxuan 'fishy' Wang2020-12-163-42/+184
| | | | | | | | | | | | | Client: go In TBinaryProtocol.ReadString, TBinaryProtocol.ReadBinary, TCompactProtocol.ReadString, and TCompactProtocol.ReadBinary, use safeReadBytes to prevent from large allocation on malformed sizes. $ go test -bench=SafeReadBytes -benchmem BenchmarkSafeReadBytes/normal-12 625057 1789 ns/op 2176 B/op 5 allocs/op BenchmarkSafeReadBytes/max-askedSize-12 545271 2236 ns/op 14464 B/op 7 allocs/op PASS
* THRIFT-5324: Create new req buffer for every http requestYuxuan 'fishy' Wang2020-12-161-9/+5
| | | | | | | | | | | Client: go The fix in https://github.com/apache/thrift/pull/2293 doesn't work for go1.10.8 due to the possibility of data races. This exposes a bigger, underlying issue regarding the ownership of the request buffer in THttpClient between THttpClient itself and the http request it creates. Instead of reset and reuse the same buffer, always give up the ownership of it and create a new buffer after each Flush call.
* THRIFT-5282: Add IPv6 client support to Lua libraryJeffrey Han2020-12-153-16/+78
| | | | | | | Client: lua Patch: Jeffrey Han This closes #2243
* THRIFT-5324: reset http client buffer after flushMorozov2020-12-152-5/+63
| | | | | | | THttpClient did not reset its internal buffer when HTTP client returned an error, leaving the whole or partially read message in the buffer. Now we reset the buffer in defer. Client: go
* Add useful links in Rust client's metadataDirkjan Ochtman2020-12-091-1/+2
| | | | | | | Client: Rust Patch: Dirkjan Ochtman This closes #2291
* THRIFT-5295 makeThread and ThreadFactory extensiblerglarix2020-12-082-8/+15
| | | | | | | | | Client: cpp Patch: Riccardo Ghetta This closes #2260 Signed-off-by: rglarix <rglarix@users.noreply.github.com>
* Fix Missed check in c_glib for frame max message size checkzeshuai0072020-12-052-0/+14
|
* THRIFT-5320: Usage of "Task" as IDL identifier generates uncompileable codeJens Geyer2020-12-045-0/+121
| | | | | | | Client: netstd Patch: Jens Geyer This closes #2289
* Fix Erlang CI: Add gen-erl into test's pathSergey Yelin2020-12-041-1/+9
| | | | | | | Client: erl Patch: Sergey Yelin This closes #2290
* Make ~TException() virtualMario Emmenlauer2020-12-031-1/+1
| | | | | | | Client: cpp Patch: Mario Emmenlauer This closes #2281
* THRIFT-5288: Move Support for ByteBuffer into TTransportDavid Mollitor2020-11-199-45/+81
| | | | | | | Client: Java Patch: David Mollitor This closes #2254
* Merge pull request #2273 from allengeorge/allen/clippy_cleanAllen George2020-11-1817-88/+86
|\ | | | | THRIFT-5306: Rust code and generated code no longer has clippy warnings (Rust 1.40)
| * THRIFT-5306: Rust code and generated code no longer has clippy warnings ↵Allen George2020-11-1217-88/+86
| | | | | | | | | | | | | | | | (Rust 1.40) Client: rs NOTE: Also properly update the min/max supported Rust versions
* | THRIFT-5303 Fix missing error handling in using PyUnicode_DecodeUTF8stiga-huang2020-11-011-1/+1
| | | | | | | | | | | | | | Client: py Patch: stiga-huang This closes #2269
* | fix warning in c_glib from add max_message_size codezeshuai0072020-10-319-34/+35
| |
* | THRIFT-5304 TWinHTTPClientImpl may incorrectly report that the message size ↵Jens Geyer2020-10-302-1/+3
|/ | | | | | | is reached Client: Delphi Patch: Jens Geyer
* Add an Automatic-Module-Name entryMark Raynsford2020-10-241-0/+1
| | | | | | | | | This adds an Automatic-Module-Name entry to the Thrift jar manifest in order to provide Thrift with a stable module name when used in a JPMS modular context. The name chosen here is "org.apache.thrift", which matches the symbolic name used for OSGi. See: http://branchandbound.net/blog/java/2017/12/automatic-module-name/
* Add DuplicateTo protocol to go's TDebugProtocolYuxuan 'fishy' Wang2020-10-191-2/+149
| | | | | | | | | | | | | | This also comes from the discussion of https://github.com/apache/thrift/pull/1992#issuecomment-705903922. I think TDebugProtocol is a better fit for this feature than creating a new TProtocol implementation. The DuplicateTo field is not added to TDebugProtocolFactory because I don't think it makes sense from the factory setup. In vast majority cases users would need direct access to the underlying TMemoryBuffer to make it useful, which is easier this way than an additional TTransportFactory plus TProtocolFactory to make TDebugProtocolFactory way too complicated.
* THRIFT-5294: Fix panic in go TSimpleJSONProtocolYuxuan 'fishy' Wang2020-10-146-61/+261
| | | | | | | | | | | | | | | | | Client: go In go library's TSimpleJSONProtocol and TJSONProtocol implementations, we use slices as stacks for context info, but didn't do proper boundary check when peeking/popping, result in it might panic with using -1 as slice index in certain cases of calling Write*End without matching Write*Begin before. Refactor the code to properly implement the stack, and return a TProtocolException instead on those cases. Also add unit tests for all protocols. The unit tests shown that TCompactProtocol.[Read|Write]StructEnd would also panic with unmatched Begin calls, so fix them as well.
* THRIFT-5240: Tweak the default go server connectivity check intervalYuxuan 'fishy' Wang2020-10-072-1/+6
| | | | | | | | | | | | | | | Client: go This is a follow up to 4db7a0af13ac9614e3e9758d42b2791040f4dc7e. Because of the Go runtime bug [1], the previous default value of 1ms is not a great default as it could cause excessive cpu usage. Use 5ms instead as a balance between being useful and not causing too much cpu overhead. It's still configurable. [1]: https://github.com/golang/go/issues/27707
* THRIFT-5290 Adjusting cpp *.cproj options according to LEGAL-538Jens Geyer2020-10-062-8/+15
| | | | | | | Client: cpp Patch: Jens Geyer This closes #2250
* THRIFT-5287: Log When Client Connections are DroppedDavid Mollitor2020-10-042-0/+3
| | | | | | | Client: java Patch: David Mollitor This closes #2253
* THRIFT-5286: Fix Lua library readBool() in TCompactProtocolJeffrey Han2020-10-021-9/+11
| | | | | | | Client: Lua Patch: Jeffrey Han This closes #2252
* THRIFT-5103: Fix for PHP7.4 deprecated syntaxStoyan Markov2020-10-012-2/+2
| | | | | | | Client: php Patch: Stoyan Markov This closes #2230
* THRIFT-5256: Fix some compile warningswangyunjian2020-10-012-3/+3
| | | | | | | | | Client: c_glib Patch: wangyunjian This closes #2207 Signed-off-by: wangyunjian <wangyunjian@huawei.com>
* Fix c_glib implicit function declarationsChristopher Chavez2020-10-012-0/+8
| | | | | | | Client: c_glib Patch: Christopher Chavez This closes #2249
* go: Use sync.Pool for gzip in HTTP transportDuru Can Celasun2020-09-301-2/+13
| | | | | | | | | b67cad4 introduced transparent gzip support for the HTTP transport but calling gzip.NewWriter() with every request causes a large number of memory allocations [1] and can create GC pressure. Avoid this by using a sync.Pool for gzip writers. [1] https://old.reddit.com/r/golang/comments/9uejp4/usage_of_syncpool_for_gzipwriter_in_http_handlers/e94jh8c/
* add the test case into cmakezeshuai0072020-09-281-0/+24
|
* THRIFT-5279: Go serializer/deserializer cleanupsYuxuan 'fishy' Wang2020-09-232-9/+54
| | | | | | | | | Client: go Cleanup the default NewTSerializer and NewTDeserializer implementations to save an unnecessary allocation, and provide NewTSerializerPoolSizeFactory and NewTDeserializerPoolSizeFactory for easier non-default pool usages.
* THRIFT-5278: Allow set protoID in go THeader transport/protocolYuxuan 'fishy' Wang2020-09-224-17/+128
| | | | | | | Client: go In Go library code, allow setting the underlying protoID to a non-default (TCompactProtocol) one for THeaderTransport/THeaderProtocol.