shithub: mc

Download patch

ref: 1d4f6a7925c05705dda39c9fe799c64138d6d02a
parent: a66d6276ae7dbea35f70632ac0bde623c2d2ee93
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Jun 20 18:20:23 EDT 2016

Add 'http://' if it's not already there.

--- a/lib/http/main.myr
+++ b/lib/http/main.myr
@@ -35,6 +35,9 @@
 	;;
 
 	for url in cmd.args
+		if !std.hasprefix(url, "http")
+			url = std.fmt("http://{}", url)
+		;;
 		u = std.try(http.parseurl(url))
 		s = std.try(http.mksession(u.schema, u.host, u.port))