From f0559867d088b0c1896540ef3de6116f8e7fb309 Mon Sep 17 00:00:00 2001 From: MineRobber___T Date: Thu, 6 Jul 2017 03:58:41 -0400 Subject: [PATCH] Fix pastebin.lua not using HTTPS Attempting to use pastebin with plain HTTP results in a 301 redirect to the HTTPS version. This PR (and associated commit) makes the pastebin command work again. --- .../assets/computercraft/lua/rom/programs/http/pastebin.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/assets/computercraft/lua/rom/programs/http/pastebin.lua b/src/main/resources/assets/computercraft/lua/rom/programs/http/pastebin.lua index abbd50a4f..e633e8d2b 100644 --- a/src/main/resources/assets/computercraft/lua/rom/programs/http/pastebin.lua +++ b/src/main/resources/assets/computercraft/lua/rom/programs/http/pastebin.lua @@ -21,7 +21,7 @@ end local function get(paste) write( "Connecting to pastebin.com... " ) local response = http.get( - "http://pastebin.com/raw/"..textutils.urlEncode( paste ) + "https://pastebin.com/raw/"..textutils.urlEncode( paste ) ) if response then @@ -56,7 +56,7 @@ if sCommand == "put" then write( "Connecting to pastebin.com... " ) local key = "0ec2eb25b6166c0c27a394ae118ad829" local response = http.post( - "http://pastebin.com/api/api_post.php", + "https://pastebin.com/api/api_post.php", "api_option=paste&".. "api_dev_key="..key.."&".. "api_paste_format=lua&"..