Граф коммитов

16 Коммитов

Автор SHA1 Сообщение Дата
Menghan Li f3ac95e6cd Check if cc.conns == nil before reading cc.conns 2016-08-18 16:43:58 -07:00
iamqizhao b13920a0cf add the mem alloc guard on server 2016-07-29 16:19:20 -07:00
Daniel Ruehle 3802318f46 Make Errorf return pointer to rpcError 2016-07-08 10:28:36 -07:00
iamqizhao aa532d5baf Fix some issues and remove garbbage files 2016-05-16 15:31:00 -07:00
iamqizhao a1b60d7b43 Add the tests for balancer and resolver 2016-05-12 17:01:58 -07:00
Anthony Romano 025674fec5 transport: do not create a Stream on a canceled context
Occasionally Invoke() would let a message slip through when the context
is already canceled.
2016-04-12 21:45:35 -07:00
Anthony Yeh a294a45ba0 Don't treat StatusDesc() as a format string.
For example, if the error message contains "%v", then passing
StatusDesc() as the format string to Errorf() will replace "%v" with
"%!v(MISSING)".
2016-03-19 17:15:21 -07:00
Victor Vieux 047af78181 fix a few typos 2016-03-16 16:40:16 -07:00
Brad Fitzpatrick ac5c8d7972 transport: use http2.Framer's MetaHeadersFrame functionality
The Framer now has support for merging HEADERS+CONTINUATION frames.
This remove the frame merging & hpack state machine from grpc.

In addition to being more compliant with the spec, this also means
gRPC enforces the header list size, removing a DoS vector.

Change-Id: Id46a6a1e741e62a859c3e3fb9f0cc36febf1d836
2016-02-25 23:44:45 +00:00
Brad Fitzpatrick 110fd99e30 Fix crashes where transports returned errors unhandled by the message parser.
The http.Handler-based transport body reader was returning error types
not understood by the recvMsg parser. See #557 for some background and
examples.

Fix the http.Handler transport and add tests. I copied in a subset of
the http2 package's serverTest type, adapted slightly to work with
grpc. In the process of adding tests, I discovered that
ErrUnexpectedEOF was also not handled by the regular server
transport. Document the rules and fix that crash as well.

Unrelated stuff in this CL:

* make tests listen on localhost:0 instead of :0, to avoid Mac firewall
  pop-up dialogs.

* rename parser.s field to parser.r, to be more idiomatic that it's an
  io.Reader and not anything fancier. (it's not acting like type
  stream, even if that's the typical concrete type)

* move 5 byte temp buffer into parser, rather than allocating it for
  each new message. (drop in the bucket improvement in garbage; more
  to do later)

* rename http2RSTErrConvTab to http2ErrConvTab, per Qi's earlier
  CL. Also add the HTTP/1.1-required error mapping for completeness,
  not that it should ever arise with gRPC, also per Qi's earlier CL
  referenced in #557.
2016-02-24 15:09:17 -08:00
Brad Fitzpatrick d52370625d Fix more cases of Fatalf being used from goroutines started by tests.
Follow-up to #515 based on comments there from @maniksurtani.
2016-02-01 21:01:14 +00:00
iamqizhao da3bb0c9f7 Support compression 2016-01-22 18:21:41 -08:00
iamqizhao 330d8f958c i) revise picker API and channel state API; ii) add unicastNamingPicker which supports custom name resolving. 2015-12-14 14:32:43 -08:00
iamqizhao 900db87189 Allow >16k status desc 2015-11-18 16:22:08 -08:00
iamqizhao f53fd361b7 initial call_test.go 2015-11-18 11:56:15 -08:00
iamqizhao 586ba13085 initial call_test.go 2015-11-18 11:34:37 -08:00