aboutsummaryrefslogtreecommitdiff
path: root/okhttp
AgeCommit message (Collapse)Author
2020-07-24Merge tag 'upstream/v1.16.1' into HEADHadrien Zalek
Update the Java gRPC implementation source to that of a released version (v1.16.1) instead of some intermediate commit after v1.15.0. Test: m grpc-java Bug: 148404241 Change-Id: I9c072aee054a4aecc1bdf39adf45e9a243b907f5
2020-06-29Build the gRPC Java OkHttp library from sourceandroid-r-beta-3android-r-beta-2Hadrien Zalek
Add a Soong module to build the gRPC lightweight transport library which is based on OkHttp. Test: m grpc-java-okhttp Bug: 148404241 Change-Id: Ib5b6c3e29f4e791a726130117ba53c417c25a0f0
2018-10-10core: add CallCredentials2 and deprecate CallCredentials' old interface (#4902)Kun Zhang
This is the first step of smoothly changing the CallCredentials API. Security level and authority are parameters required to be passed to applyRequestMetadata(). This change wraps them, along with MethodDescriptor and the transport attributes to RequestInfo, which is more clear to the implementers. ATTR_SECURITY_LEVEL is moved to the internal GrpcAttributes and annotated as TransportAttr, because transports are required to set it, but no user is actually reading them from {Client,Server}Call.getAttributes(). ATTR_AUTHORITY is removed, because no transport is overriding it. All involved interfaces are changed to abstract classes, as this will make further API changes smoother. The CallCredentials name is stabilized, thus we first introduce CallCredentials2, ask CallCredentials implementations to migrate to it, while GRPC accepting both at the same time, then replace CallCredentials with CallCredentials2.
2018-10-10okhttp: Add SslGuard to list of allowed security providers. See internal ↵Grant Oakley
issue b/116007005 for more details.
2018-10-09okhttp: make AsyncFrameWriter log quietly when socket is already closed. ↵creamsoup
also, default log level down to INFO(closed) which is same as NettyServerTransport. (#4927)
2018-10-05okhttp: remove internal mockito depCarl Mastrangelo
2018-10-03core: add Grpc.TRANSPORT_ATTR_LOCAL_ADDR (#4906)Kun Zhang
Resolves #4135
2018-09-24okhttp: include better ALPN error message and fine log some exceptionsCarl Mastrangelo
2018-09-14all: use Java7 bracketsCarl Mastrangelo
2018-09-10netty,okhttp: Enable TransportTest.flowControlPushBackEric Anderson
It appears to be stable now. Ran for 1000s of times. I do see some general flakiness in TransportTest, but it applies to the tests in general and isn't specific to this one test. It is: ``` org.mockito.exceptions.verification.WantedButNotInvoked: Wanted but not invoked: listener.transportReady(); -> at io.grpc.internal.testing.AbstractTransportTest.startTransport(AbstractTransportTest.java:1815) Actually, there were zero interactions with this mock. ``` This flake is not seen often because it occurs less frequently when running all the tests (~.1% vs 1%). One of the early tests must warm something up to make it less likely.
2018-09-06okhttp: settings acks back after apply settings before sending any data (#4825)creamsoup
okhttp: setting acks back after apply settings before sending any data as a result of the change. Resolves #4809 also, make #4816 the not flaky.
2018-09-05all: prepend internal classes with Internal (#4826)zpencer
This is a safer way to hide the classes, because they will not appear in public targets for some build configurations.
2018-09-04all: move Channelz to io.grpc as InternalChannelz (#4797)zpencer
This is an API used to coordinate across packages and must live in `io.grpc`. Prepending `Internal` makes it easier to detect and hide this class from public visibility when using certain build tools. fixes #4796
2018-08-28okhttp: use java 7, avoid compiler varargs warning (#4806)Eric Gribkoff
2018-08-27all: Swap to Java 7 source and bytecodeEric Anderson
Core and OkHttp are left with Java 6 for the moment. Once we resolve their issues they could be bumped as well. Updates #3961
2018-08-17Implement flush coalescing in OkHttp. (#4763)creamsoup
okhttp: Implement flush coalescing.
2018-08-09all: update animalsniffer to Java 7 and add Android 14 (#4727)Eric Gribkoff
2018-07-09Propagate EquivalentAddressGroup attributes to transportsEric Anderson
Most of the changes are changing the signature of newClientTransport. Since this is annoying, I choose to introduce a ClientTransportOptions object to avoid the churn in the future. With ClientTransportOptions in place, there's only a few lines necessary of plumbing for the Attributes: add the field to ClientTransportOptions and populate it in InternalSubchannel. There are no consumers of the field in this commit.
2018-06-28netty,okhttp: make rpc followed by racy GOAWAY transparent-retry-ableZHANG Dapeng
A new RPC starts with the following steps: 1. Pick a READY transport 2. the READY transport calls `transport.newStream()` 3. the new stream calls `stream.start()` 4. `stream.start()` invokes or enqueus `writeHeaders()` (or for GET request, noop) A racy GOAWAY could happen between 3 and 4, and by the retry spec, the RPC should be transparent-retry-able in this case. For Netty and OkHttp transport implementation, before step 4, (even if step 1, 2, and 3 excluding 4 are made atomic,) the http2-stream for the RPC is not created, so the current transparent retry logic does not apply and need fix. Of course, if step 1, 2, and 3 including 4 are made atomic, and not with GET, there will be no such problem.
2018-06-11all: add gradle format checkerZHANG Dapeng
This PR adds an automatic gradle format checker and reformats all the *.gradle files. After this, new changes to *.gradle files will fail to build if not in good format, just like checkStyle failure.
2018-06-05okhttp: deprecate OkHttpChannelBuilder#negotiationType (#4533)Eric Gribkoff
2018-05-24Propagate CallCredentials.ATTR_SECURITY_LEVEL from transportsEric Anderson
Previously no transport provided the key so CallCredentials would always see the security as NONE.
2018-05-21core: fix client does not detect truncated messageZHANG Dapeng
Resolves #3264
2018-05-21all: TimeProvider to use nanos rather than millisZHANG Dapeng
This is the same practice as #2833
2018-05-07core,netty,okhttp: make toString more consistent for channelz (#4434)zpencer
Use MoreObjects.toStringHelper and use only the log id's long value, because the class name is already present in the toStringHelper.
2018-05-03 all: normalize copyright header Carl Mastrangelo
2018-04-25core,netty,okhttp,services,testing: expose security info to channelz (#4300)zpencer
Pull the TLS info from the SSLSession object for TLS, and AltsContext for ALTS.
2018-04-13services: socket options were erroneously ignored if socket has no stats (#4336)zpencer
This fixes listen sockets. It is ok to have no data but report socket options.
2018-04-02okhttp: properly verify IPv6 address hosts (#4292)David Brodsky
Address mismatch between IPv6 address hosts derived from URIs and X509 subjectAltName extensions
2018-03-30core,netty,okhttp,services: expose socket options to channelz (#4228)zpencer
For okhttp, expose the standard options from the Socket object. For netty, expose all the `io.netty.channel.ChannelOption`s of the `channel.config()`.
2018-03-28okhttp: add hpack test for max dynamic table sizeEric Gribkoff
2018-03-28okhttp: include tests in third_party/okhttpEric Gribkoff
2018-03-28okhttp: rename ambiguous variables in Hpack readerEric Gribkoff
2018-03-28okhttp: fix HPACK reader bugEric Gribkoff
2018-03-26okhttp: Convert to internal ConnectionSpec eagerlyEric Anderson
This allows ProGuard to remove OkHttp's ConnectionSpec in most cases, saving about 40 methods. The savings won't be realized until DEFAULT_CONNECTION_SPEC is removed.
2018-03-23netty,okhttp,testing: always set TRANSPORT_ATTR_REMOTE_ADDR (#4217)zpencer
Always set the remote address, no reason why this should be a TLS-only feature. This is needed for channelz, and is especially useful in unit tests where we are using plaintext. This PR adds the attr for plaintext.
2018-03-22core,netty: client sends rst stream when server half-closes (#4222)Eric Gribkoff
2018-03-20 okhttp: support JDK9 ALPN (#4136)Eric Gribkoff
2018-03-12core,netty,okhttp: Transparent retryZHANG Dapeng
Changes: - `ClientStreamListener.onClose(Status status, RpcProgress rpcProgress, Metadata trailers)` added. - `AbstractClientStream.transportReportStatus(Status status, RpcProgress rpcProgress, boolean stopDelivery, Metadata trailers)` added - `ClientCallImpl.ClientStreamListenerImpl` will ignore the arg `rpcProgress` (non retry) - `RetriableStream.SubListener` will handle `rpcProgress` and decide if transparent retry. - `NettyClientHandler` and `OkHttpClientTransport` will pass `RpcProgress.REFUSED` to client stream listener for later stream ids when received GOAWAY, or for stream received a RST_STREAM frame with REFUSED code. - All other files are just a result of refactoring.
2018-03-12core,okhttp,netty,alts,testing: Plumb proxy resolved addr to transports (#4137)zpencer
ProxyDetector is now responsible for resolving the proxy's `InetSocketAddress`, and `ProxyParameters` asserts that the address is resolved. The results are plumbed through using a `PairSocketAddress`, which is a special `SocketAddress`. If a proxy should be used but the proxy can not be resolved, we the `DnsNameResolver` will re-attempt the resolution later. Remove the unit test testing for unresolved proxy addresses, since it's no longer applicable.
2018-03-08core,netty,okhttp,testing: separate local vs remote stream start times for ↵zpencer
channelz (#4194) The channelz spec states that the two must be separate.
2018-03-08core,netty,okhttp,testing: nest TransportStats inside SocketStats for ↵zpencer
channelz (#4190) Transport ststistics should really be a child member of SocketStats. While we're at it, let's add the local and remote SocketAddress to SocketStats, with a test.
2018-03-01core: allow application to provide all threads - okhttp channelZHANG Dapeng
2018-02-28core,netty,okhttp,alts,inprocess: deprecate usePlaintext(boolean)Carl Mastrangelo
2018-02-08core,netty,okhttp: use ServiceProviders for ManagedChannelProvider, ↵zpencer
ServerProvider (#4047)
2018-01-31okhttp: support Conscrypt security providerEric Gribkoff
2018-01-25core: move ChannelStats and TransportStats to io.grpc.internal.Channelz (#4008)zpencer
2018-01-25core: move Instrumented, LogId, WithLogId to io.grpc.internal as public (#3995)zpencer
2018-01-09Update ErrorProne to 2.1.3 and fix failuresEric Anderson
The fixes could have subtle side-effects, but I did take care when making them.
2018-01-08Enable the Guava Beta CheckerEric Anderson