Software /
code /
prosody
Diff
net/http.lua @ 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 |
parent | 4865:9171dc2357e0 |
child | 4977:7006ccbf22a9 |
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