Changeset

4972:1777271a1ec0

net.http: Use base64 from util.encodings instead of luasocket
author Kim Alvefur <zash@zash.se>
date Sat, 07 Jul 2012 23:22:15 +0200
parents 4944:72a2eec4204a
children 4976:0875c9208580
files net/http.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/net/http.lua	Sat Jul 07 03:42:31 2012 +0200
+++ b/net/http.lua	Sat Jul 07 23:22:15 2012 +0200
@@ -7,7 +7,7 @@
 --
 
 local socket = require "socket"
-local mime = require "mime"
+local b64 = require "util.encodings".base64.encode;
 local url = require "socket.url"
 local httpstream_new = require "util.httpstream".new;
 
@@ -154,7 +154,7 @@
 	};
 	
 	if req.userinfo then
-		headers["Authorization"] = "Basic "..mime.b64(req.userinfo);
+		headers["Authorization"] = "Basic "..b64(req.userinfo);
 	end
 
 	if ex then