You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2017/12/13 14:00:19 UTC

[whimsy] branch master updated: Alternate host might not use https

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new b407468  Alternate host might not use https
b407468 is described below

commit b407468c5d777708a582cf81aad009ebcf5395c0
Author: Sebb <se...@apache.org>
AuthorDate: Wed Dec 13 14:00:12 2017 +0000

    Alternate host might not use https
---
 tools/ponyapi.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/ponyapi.rb b/tools/ponyapi.rb
index 0c8f4b3..cb0710c 100644
--- a/tools/ponyapi.rb
+++ b/tools/ponyapi.rb
@@ -132,7 +132,7 @@ module PonyAPI
   # Fetch a Ponymail API, with optional logged-in cookie
   def fetch_pony(uri, cookie)
     uri = URI.parse(uri)
-    Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |https|
+    Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == 'https') do |https|
       request = Net::HTTP::Get.new(uri.request_uri)
       request['Cookie'] = "ponymail=#{cookie}" if cookie != ''
       response = https.request(request)

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].