diff --git a/sgx-bwmsgsv2.rb b/sgx-bwmsgsv2.rb index c2cc46007dab43847426cdf4ea6d9db96d0aa49a..e9a29d999321d70dca6d0cfa47cad7c4a4b05e55 100755 --- a/sgx-bwmsgsv2.rb +++ b/sgx-bwmsgsv2.rb @@ -365,7 +365,7 @@ module SGXbwmsgsv2 end EM::HttpRequest.new( - url_prefix + pth + URI.parse(url_prefix + pth), tls: {verify_peer: true} ).public_send( "a#{m}", head: { @@ -409,7 +409,7 @@ module SGXbwmsgsv2 return to_catapult(s, nil, num_dest, user_id, token, secret, usern) end - EM::HttpRequest.new(un.text, tls: {verify_peer: true}).ahead.then { |http| + EM::HttpRequest.new(URI.parse(un.text), tls: {verify_peer: true}).ahead.then { |http| # If content is too large, or MIME type is not supported, place the link inside the body and do not send MMS. if http.response_header["CONTENT_LENGTH"].to_i > 3500000 || !MMS_MIME_TYPES.include?(http.response_header["CONTENT_TYPE"])