Lars Lehtonen
754609bcb1
remove support for deprecated tls.VersionSSL30
2019-11-07 20:07:30 -08:00
Soheil Hassas Yeganeh
e09e9389d8
Do not write SETTINGS in response to ACKs.
...
Reported-by talgendler in Issue #42
2018-01-29 10:50:01 -05:00
Peter Edge
bb79a83465
Add matchers for header value prefixes
2017-08-14 16:21:37 -04:00
Aman Gupta
9a3402ad7a
unexport prefixByteMatcher
2017-07-19 21:45:02 -07:00
Aman Gupta
4f90533583
add TLS matcher
2017-07-19 20:08:18 -07:00
Soheil Hassas Yeganeh
c0f3570a02
Eliminate blocking reads in the HTTP2 matcher.
...
The HTTP2 matcher uses io.ReadFull to read the client preface.
If the client sends a string shorter than the preface (e.g.,
SSL version) io.ReadFull will block.
Replace io.ReadFull with Read and assume partial reads will not
match
Fixes #44
2017-04-23 00:08:19 -04:00
Soheil Hassas Yeganeh
861c99e0fc
Return not-match on different field values in HTTP2
...
Retun as soon as we have the matched field in the HTTP2 matcher
regardless of weather the value is matched or not. Fixes #35 .
Issue #35 reports that cmux leaks memory when the client is HTTP2
but does not sends the expected header field. For example, when
the non-gRPC client sends a large field in the header and we are
matching for gRPC, we waste a lot of memory in the sniff buffer.
2016-09-25 00:58:17 -04:00
Soheil Hassas Yeganeh
cd9b7d74b9
Add copyright notice headers on all Go files.
...
As per http://www.apache.org/legal/src-headers.html#headers
Fixes #28
2016-07-09 13:56:02 -04:00
Soheil Hassas Yeganeh
d83a667cb2
Add Matchers that can write back on the channel
...
As reported in issue #22 reports that Java gRPC clients cannot
handshake with cmux'ed gRPC server, since the client does not
immediately send a header with the content-type field. The reason
is that the java client, block on receiving the first SETTING
frame.
Add MatchWriter that can match and write on the connection. Implement
a MatchWriter that writes a SETTING frame once it receives a SETTING
frame.
2016-04-24 14:47:08 -04:00
Tamir Duberstein
204cc45a24
http2: use io.ReadFull
...
This fixes an issue where an earlier matcher does not sufficiently
populate the buffer, preventing HTTP2 from reading enough bytes on the
Read call.
2016-02-23 11:25:36 -05:00
Tamir Duberstein
b5e73ea381
remove named returns and useless closures
2016-02-21 12:09:02 -05:00
Tamir Duberstein
92a63c4fce
errcheck
...
go/src/github.com/soheilhy/cmux/cmux.go:127:13 c.Close()
go/src/github.com/soheilhy/cmux/cmux.go:134:9 c.Close()
go/src/github.com/soheilhy/cmux/cmux.go:137:15 m.root.Close()
go/src/github.com/soheilhy/cmux/cmux_test.go:43:9 s.Serve(l)
go/src/github.com/soheilhy/cmux/cmux_test.go:52:20 defer r.Body.Close()
go/src/github.com/soheilhy/cmux/cmux_test.go:72:12 s.Register(TestRPCRcvr{})
go/src/github.com/soheilhy/cmux/cmux_test.go:103:15 defer l.Close()
go/src/github.com/soheilhy/cmux/cmux_test.go:109:15 go muxl.Serve()
go/src/github.com/soheilhy/cmux/cmux_test.go:116:20 defer r.Body.Close()
go/src/github.com/soheilhy/cmux/cmux_test.go:125:15 defer l.Close()
go/src/github.com/soheilhy/cmux/cmux_test.go:133:15 go muxl.Serve()
go/src/github.com/soheilhy/cmux/cmux_test.go:141:15 defer l.Close()
go/src/github.com/soheilhy/cmux/cmux_test.go:147:15 go muxl.Serve()
go/src/github.com/soheilhy/cmux/example_recursive_test.go:27:9 s.Serve(l)
go/src/github.com/soheilhy/cmux/example_recursive_test.go:56:12 s.Register(&RecursiveRPCRcvr{})
go/src/github.com/soheilhy/cmux/example_recursive_test.go:88:15 go tlsm.Serve()
go/src/github.com/soheilhy/cmux/example_recursive_test.go:89:12 tcpm.Serve()
go/src/github.com/soheilhy/cmux/example_test.go:30:9 s.Serve(l)
go/src/github.com/soheilhy/cmux/example_test.go:34:9 io.Copy(ws, ws)
go/src/github.com/soheilhy/cmux/example_test.go:41:9 s.Serve(l)
go/src/github.com/soheilhy/cmux/example_test.go:53:12 s.Register(&ExampleRPCRcvr{})
go/src/github.com/soheilhy/cmux/example_test.go:68:13 grpcs.Serve(l)
go/src/github.com/soheilhy/cmux/example_test.go:97:9 m.Serve()
go/src/github.com/soheilhy/cmux/example_tls_test.go:24:9 s.Serve(l)
go/src/github.com/soheilhy/cmux/example_tls_test.go:69:9 m.Serve()
go/src/github.com/soheilhy/cmux/matchers.go:151:14 hdec.Write(f.HeaderBlockFragment())
2016-02-21 12:02:37 -05:00
Soheil Hassas Yeganeh
3ca13bcd9e
Remove the unncessary var and const blocks
2016-02-21 10:37:29 -05:00
Dmitri Shuralyov
44b568c84b
Update to correct vanity import paths.
...
The latest canonical import path for http2 package is
"golang.org/x/net/http2".
The latest canonical import path for grpc examples is
"google.golang.org/grpc/examples/...".
2015-11-25 23:19:45 -05:00
Soheil Hassas Yeganeh
cc3a35aef1
Implement the matcher HTTP1 fields
...
This commit adds the implementation for HTTP 1 header fields.
2015-07-29 14:49:37 -04:00
Soheil Hassas Yeganeh
033dffc90d
Rename selectors.go to matchers.go to be consitent
2015-07-29 14:07:52 -04:00