You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2013/08/14 21:34:27 UTC
[1/2] git commit: THRIFT-2118 Certificate error handling still
incorrect
Updated Branches:
refs/heads/master f8e8c5992 -> 3bb141d36
THRIFT-2118 Certificate error handling still incorrect
Patch: Jens Geyer
Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/1bb0ed88
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/1bb0ed88
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/1bb0ed88
Branch: refs/heads/master
Commit: 1bb0ed88f240641a090edb075592ef2ca9ee80c5
Parents: f8e8c59
Author: Jens Geyer <je...@apache.org>
Authored: Tue Aug 13 22:31:53 2013 +0200
Committer: Jens Geyer <je...@apache.org>
Committed: Wed Aug 14 21:33:51 2013 +0200
----------------------------------------------------------------------
tutorial/go/src/server.go | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/thrift/blob/1bb0ed88/tutorial/go/src/server.go
----------------------------------------------------------------------
diff --git a/tutorial/go/src/server.go b/tutorial/go/src/server.go
index 0374cde..ebcfe5b 100644
--- a/tutorial/go/src/server.go
+++ b/tutorial/go/src/server.go
@@ -33,9 +33,7 @@ func runServer(transportFactory thrift.TTransportFactory, protocolFactory thrift
cfg := new(tls.Config)
if cert, err := tls.LoadX509KeyPair("server.crt", "server.key"); err == nil {
cfg.Certificates = append(cfg.Certificates, cert)
- }
- if err != nil {
- fmt.Println("Unable to load server certificate and key")
+ } else {
return err
}
transport, err = thrift.NewTSSLServerSocket(addr, cfg)
[2/2] git commit: THRIFT-2036 Thrift gem warns about class variable
access from top level
Posted by je...@apache.org.
THRIFT-2036 Thrift gem warns about class variable access from top level
Patch: Takuya Hashimoto & Keith Barrette
Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/3bb141d3
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/3bb141d3
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/3bb141d3
Branch: refs/heads/master
Commit: 3bb141d3689f0778af3dcf3218cfe760c36803bc
Parents: 1bb0ed8
Author: Jens Geyer <je...@apache.org>
Authored: Wed Aug 14 21:33:16 2013 +0200
Committer: Jens Geyer <je...@apache.org>
Committed: Wed Aug 14 21:33:53 2013 +0200
----------------------------------------------------------------------
lib/rb/lib/thrift/protocol/json_protocol.rb | 33 +++++++++++++-----------
1 file changed, 18 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/thrift/blob/3bb141d3/lib/rb/lib/thrift/protocol/json_protocol.rb
----------------------------------------------------------------------
diff --git a/lib/rb/lib/thrift/protocol/json_protocol.rb b/lib/rb/lib/thrift/protocol/json_protocol.rb
index 8694b7d..2e85089 100644
--- a/lib/rb/lib/thrift/protocol/json_protocol.rb
+++ b/lib/rb/lib/thrift/protocol/json_protocol.rb
@@ -18,21 +18,6 @@
# under the License.
#
-@@kJSONObjectStart = '{'
-@@kJSONObjectEnd = '}'
-@@kJSONArrayStart = '['
-@@kJSONArrayEnd = ']'
-@@kJSONNewline = '\n'
-@@kJSONElemSeparator = ','
-@@kJSONPairSeparator = ':'
-@@kJSONBackslash = '\\'
-@@kJSONStringDelimiter = '"'
-
-@@kThriftVersion1 = 1
-
-@@kThriftNan = "NaN"
-@@kThriftInfinity = "Infinity"
-@@kThriftNegativeInfinity = "-Infinity"
module Thrift
class LookaheadReader
@@ -66,6 +51,7 @@ module Thrift
# implementations
#
class JSONContext
+ @@kJSONElemSeparator = ','
#
# Write context data to the trans. Default is to do nothing.
#
@@ -89,6 +75,8 @@ module Thrift
# Context class for object member key-value pairs
class JSONPairContext < JSONContext
+ @@kJSONPairSeparator = ':'
+
def initialize
@first = true
@colon = true
@@ -146,6 +134,21 @@ module Thrift
end
class JsonProtocol < BaseProtocol
+
+ @@kJSONObjectStart = '{'
+ @@kJSONObjectEnd = '}'
+ @@kJSONArrayStart = '['
+ @@kJSONArrayEnd = ']'
+ @@kJSONNewline = '\n'
+ @@kJSONBackslash = '\\'
+ @@kJSONStringDelimiter = '"'
+
+ @@kThriftVersion1 = 1
+
+ @@kThriftNan = "NaN"
+ @@kThriftInfinity = "Infinity"
+ @@kThriftNegativeInfinity = "-Infinity"
+
def initialize(trans)
super(trans)
@context = JSONContext.new