Commit Graph

281 Commits

Author SHA1 Message Date
zpencer 51bbc1a4bd
okhttp: make outbound window size readable (#3727) 2017-11-13 14:31:15 -08:00
zpencer 12df89b062
okhttp: disable census when in GAE+JDK7 (#3696)
Disable census for now due to:
https://github.com/census-instrumentation/opencensus-java/issues/777
2017-11-13 10:16:06 -08:00
ramaraochavali 17e1ad9bb2 core: Add useTransportSecurity to ManagedChannelBuilder
This allows the consumer of a builder to swap back from plaintext.
2017-11-10 10:57:05 -08:00
Eric Anderson bbb98feb75 Fix broken method names in tests that include leading '/'
The method name passed to MethodDescriptor does not include the leading
'/'. If it does, on the wire it will actually cause two slashes. This
has been this way for a _long_ time, but in tests that ignore the method
name or use the same MethodDescriptor no client and server the extra /
"works fine." But it's misleading, so let's remove it.
2017-11-08 15:24:50 -08:00
zpencer a3c44fa7ca
core,netty,okhttp: add TransportTracer param to ClientStream and Http2ClientStreamTransportState (#3668)
This diff does not actually change any behaviors yet, that will come
in the next diff along with unit tests for those new behaviors. This
diff's goal is only to change the method signatures so future diffs
are cleaner.
2017-11-07 16:08:55 -08:00
zpencer a2e9a7f6dd
core,ntety,okhttp: Add getTransportStats method to ClientTransport (#3662)
This merely adds the method but does not do anything yet.
2017-11-06 13:24:20 -08:00
zpencer 9fac15d4f8
core,netty,okhttp: move transport tracer outbound counters to transport thread (#3661)
Counters are bumped when a message is completely written. If a
part of a message is still buffered and not yet flushed, we will
not increment the stats.
2017-11-06 12:46:17 -08:00
Eric Anderson f9f603570d Allow tests to run on IPv6-less machines
Our Travis-CI builds are failing with "Protocol family unavailable" due
to the usage of ::1. Although it's 2017 and we'd expect to have ipv6
_loopback_ anywhere that mattered, apparently that's not the case.

The tests now work equally well on IPv4-only and IPv6-only machines.
2017-11-02 13:32:34 -07:00
Eric Anderson 698ba803d5 Move ProxyDetectorImplTest to core.
It should never have been in okhttp.
2017-10-20 13:49:54 -07:00
zpencer 7df9ae9753 core,netty,okhttp: detect proxy via ProxySelector (#3021)
This lets us specify the proxy using `-Dhttps.proxyHost=host -Dhttps.proxyPort=port`
along with auth info like username and password.
2017-10-17 19:26:11 -07:00
Kun Zhang 8edead0851 core: make in-process transport support StreamTracer
This is needed for both completeness and stats/tracing contexts propagation.

Stats recording with Census is intentionally disabled (#2284), while the rest of the Census-related logic work the same as on the other transports.
2017-10-09 10:14:36 -07:00
Carl Mastrangelo 5e36a8deb5 all: upgrade to JUnit 4.12 2017-10-05 11:24:15 -07:00
Eric Anderson e92b72588d Promote keepalive to ManagedChannelBuilder; stabilize
Fixes #3493
2017-09-27 11:59:04 -07:00
Kun Zhang a9941a8bcf okhttp/test: add missing annotation. (#3476) 2017-09-18 15:35:18 -07:00
zpencer 2b1363d586 core,netty,okhttp,protobuf-lite: avoid @Beta guava classes (#3463) 2017-09-14 19:39:06 -07:00
zpencer bb203657cb okhttp: update caller of Headers.createRequestHeaders (#3465) 2017-09-14 17:19:36 -07:00
zpencer bda67784c0 core,netty,okhttp: strip outbound headers with reserved names (#3098)
These will be stripped:
CONTENT_TYPE, TE, USER_AGENT
2017-09-14 15:26:36 -07:00
Eric Gribkoff ec600feb87 okhttp: set GET method in headers (#3316) 2017-09-11 13:58:33 -07:00
Carl Mastrangelo c024f17429 netty,okhttp: include more detail about ALPN missing
Additionally: include info on why android classes are missing
2017-08-24 16:00:36 -07:00
Kun Zhang 41410345e6 core: pass status to ManagedClientTransport.shutdown() (#3351)
This aligns with shutdownNow(), which is already accepting a status.
The status will be propagated to application when RPCs failed because
of transport shutdown, which will become useful information for debug.
2017-08-16 10:23:07 -07:00
ZHANG Dapeng c71e2919de all: fix typo of overridden
s/overriden/overridden/g
2017-08-11 16:53:53 -07:00
Eric Gribkoff 9b74f8e756 core,netty,okhttp: add option to deframe in app thread 2017-08-11 16:52:45 -07:00
Eric Gribkoff 16575d01a3 core,netty,okhttp,testing: switch to StreamListener.messagesAvailable 2017-08-11 16:52:45 -07:00
Paul Gross 72b9ee22b8 all: Fix mismatch in naming Bazel Maven jars
This commit aligns the naming of the Bazel Maven jars with the names
used by Bazel's migration-tooling project:

https://github.com/bazelbuild/migration-tooling

Unfortunately, we can't fix @com_google_protobuf_java because it's
required by Bazel itself.

Fixes #3328
2017-08-11 16:39:43 -07:00
Eric Anderson c392a91a99 okhttp: Make Headers package-private
There was no way to use it without touching internal APIs, and it should
never have been public to begin with as it serves no purpose to a user.
2017-08-10 14:25:16 -07:00
Eric Anderson bd743f3afd core: Channel uses transport's ScheduledExecutorService
Coupled with the similar change on server-side, this removes the need for a
thread when using Netty. For InProcess and OkHttp, it would allow us to let the
user to provide the scheduler for tests or application-wide thread sharing.
2017-07-25 14:26:16 -07:00
ZHANG Dapeng 883a85ee93 core,netty,okhttp: remove 2-arg ClientTransport.newStream()
to keep only one `newStream()` method in the `ClientTransport` interface
2017-07-25 14:12:36 -07:00
Eric Anderson d325919f62 core: Use Class.forName(String) in provider for Android
Class.forName(String) is understood by ProGuard, removing the need for
manual ProGuard configuration and allows ProGuard to rename the provider
classes. Previously the provider classes could not be renamed.

Fixes #2633
2017-07-19 10:15:03 -07:00
Ian Haken 677c84e1d4 okhttp: Add support for specifying a custom hostname verifier when using on OkHttpChannelBuilder. 2017-07-14 16:04:15 -07:00
Eric Anderson cbad906c0e Update to Error Prone 2.0.21 2017-07-07 10:30:14 -07:00
Eric Anderson c436561fc5 all: Use fixed version number for java 6/7 signatures
This is important for stable builds, as if the signature changes the old source
may no longer validate.
2017-06-30 15:25:34 -07:00
Simon Horlick 6d9e149dcb build: Add Bazel java_grpc_library rule
Bazel third party dependencies are specified in repositories.bzl which
gives the consumer the ability to opt-out of any dependencies they use
directly in their own project.

Fixes #2756
2017-06-22 13:06:49 -07:00
Carl Mastrangelo 6ef77e0609 core: hide access to Status code and message keys 2017-06-08 10:16:06 -07:00
Carl Mastrangelo 166108a943 all: fix licence whitespace 2017-06-01 14:28:37 -07:00
Carl Mastrangelo 3bfd630bff all: update to Apache 2 licence
Also, update the authors.
2017-05-31 13:29:01 -07:00
Eric Gribkoff f52b4c1443 okhttp: ignore unknown HTTP/2 settings 2017-05-30 09:23:53 -07:00
Carl Mastrangelo ee38b3754e core: remove 2 suffix from streams 2017-05-26 16:59:54 -07:00
Eric Gribkoff 5dc8a124bf interop-testing,okhttp,testing: update tests to pass with ipv6 2017-05-16 17:01:05 -07:00
Carl Mastrangelo 7be1720fce core: don't expose internal Metadata.headerCount 2017-05-15 18:33:10 -07:00
Eric Anderson 3fc8163fbd okhttp: Make implicit cast explicit to declare it safe 2017-05-15 15:39:49 -07:00
Muxi Yan f674776a6c Add/Fix some docs (#2970)
* Add/Fix some docs

* Address comments

* Address comments

* Address comments

* Add remarks

* Build fixes

* Revision

* More revision
2017-05-04 10:57:49 -07:00
ZHANG Dapeng 7d048af68e javadoc: fix broken links in javadoc 2017-05-02 16:21:43 -07:00
zpencer a317912a14 Channel.authority() should return the value of overrideAuthority (#2956)
AbstractManagedChannelImplBuilder accepts an overrideAuthority parameter, but this value is not hooked up to the name resolver object. Ultimately, Channel.authority consults with the NameResolver, so the overrideAuthority should be hooked into the NameResolverFactory, while all other functionality should be preserved.

Also, add unit tests for all the variants of OkHttpChannelBuilder and NettyChannelBuilder constructors, namely to test the slightly different NettyChannelBuilder(SocketAddress) code path.

Fixes #2682
2017-04-27 14:17:38 -07:00
Xiao Hang de0df9740a okhttp: Support GET in okhttp transport 2017-04-26 14:11:32 -07:00
ZHANG Dapeng 4989736684 core: clamp keepAliveTime/Timeout in a way easier for test 2017-04-17 15:06:25 -07:00
Eric Anderson 393ebf7cdd netty,okhttp: handle ENHANCE_YOUR_CALM and too_many_pings
Any ENHANCE_YOUR_CALM is good reason to log, but too_many_pings also
triggers increase of the keepalive time for later connections.
2017-04-17 14:25:16 -07:00
Kun Zhang 6618f9739e core: add inboundHeaders() to ClientStreamTracer. (#2921)
Also renamed headersSent to outboundHeaders
2017-04-17 14:01:34 -07:00
Eric Anderson b661ac7d73 core: Delete AbstractStream (replaced by AbstractStream2)
AbstractStream2 will be renamed in a later commit.
2017-04-13 16:26:56 -07:00
Xiao Hang 55e3b71888 Move okhttp to AbstractStream2 2017-04-13 14:49:48 -07:00
Carl Mastrangelo be61af42e9 core: use RESOURCE_EXHAUSTED for max message size failures 2017-04-13 08:35:48 -07:00