]> Cypherpunks repositories - gostls13.git/commit
change HTTP access for RPC.
authorRuss Cox <rsc@golang.org>
Wed, 15 Jul 2009 17:49:47 +0000 (10:49 -0700)
committerRuss Cox <rsc@golang.org>
Wed, 15 Jul 2009 17:49:47 +0000 (10:49 -0700)
commitaa1e8064b211acfe96364da1de28deae3398a217
treede3fb5aabd82594b550245105ed1726b00399799
parent8b7951495cc809149d35573f80d76a3c0e3b11db
change HTTP access for RPC.

1. use CONNECT instead of GET.
   CONNECT has exactly the meaning
   we want; most of the time people
   connect to ip:port; we're connecting
   to /_goRPC_

2. wait for a successful HTTP response
   before assuming we are connected to
   the RPC protocol.  this allows better
   error reporting and also keeps the
   protocol alternating between speakers,
   so that the buffering in the HTTP request
   reader cannot accidentally eat some
   RPC bytes too.

gotest sometimes hangs, but not in HTTP.

gotest -match=Unknown hangs every few runs
even in a clean client.

R=r
DELTA=117  (57 added, 44 deleted, 16 changed)
OCL=31656
CL=31685
src/pkg/http/client.go
src/pkg/rpc/client.go
src/pkg/rpc/server.go