From 75d0c1769ef26037a1fafb4ce45b705d2063c4ac Mon Sep 17 00:00:00 2001 From: Denver Gingerich Date: Tue, 21 Apr 2020 00:25:40 +0000 Subject: [PATCH] translator now sends Bandwidth's JSON: w/o tstamps We previously sent the JSON blob that included the translator- and acceptor-generated timestamps. However, it is better is the SGX just receives precisely the JSON that Bandwidth would have sent it, as that makes it more easily compatible (i.e. if you want to use the SGX without the acceptor and translator in front of it). So we do that here, being careful to pass on valid JSON (otherwise Goliath will have an HTTP 400 fit). --- r2s-bwmsgsv2.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r2s-bwmsgsv2.rb b/r2s-bwmsgsv2.rb index 9c0815d7e0e6cf5f01d8ca8ef1fd3f185aa52d6e..4f141d3f0ae1b8af50b4fe1427dc9aa60198e9f2 100755 --- a/r2s-bwmsgsv2.rb +++ b/r2s-bwmsgsv2.rb @@ -91,7 +91,7 @@ while true uri = URI("http://#{ARGV[1]}:#{ARGV[2]}/") req = Net::HTTP::Post.new(uri, 'Content-Type' => 'application/json') - req.body = "{#{new_json_blob}}" # TODO: should just be MSG part (?) + req.body = new_json_blob.split('G')[1][2..-1] # only use MSG part begin res = Net::HTTP.start(uri.hostname, uri.port) do |http| http.request(req)