aboutsummaryrefslogtreecommitdiff
path: root/test/httptest.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/httptest.lua')
-rw-r--r--test/httptest.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/httptest.lua b/test/httptest.lua
index 3d0db87..dc90741 100644
--- a/test/httptest.lua
+++ b/test/httptest.lua
@@ -5,14 +5,14 @@
5-- needs "AllowOverride AuthConfig" on /home/c/diego/tec/luasocket/test/auth 5-- needs "AllowOverride AuthConfig" on /home/c/diego/tec/luasocket/test/auth
6dofile("noglobals.lua") 6dofile("noglobals.lua")
7 7
8local host, proxyh, proxyp, request, response 8local host, proxyhost, proxyport, request, response
9local ignore, expect, index, prefix, cgiprefix 9local ignore, expect, index, prefix, cgiprefix
10 10
11local t = socket.time() 11local t = socket.time()
12 12
13host = host or "diego.princeton.edu" 13host = host or "diego.princeton.edu"
14proxyh = proxyh or "localhost" 14proxyhost = proxyhost or "localhost"
15proxyp = proxyp or 3128 15proxyport = proxyport or 3128
16prefix = prefix or "/luasocket-test" 16prefix = prefix or "/luasocket-test"
17cgiprefix = cgiprefix or "/luasocket-test-cgi" 17cgiprefix = cgiprefix or "/luasocket-test-cgi"
18 18
@@ -129,8 +129,8 @@ request = {
129 method = "POST", 129 method = "POST",
130 body = index, 130 body = index,
131 headers = { ["content-length"] = string.len(index) }, 131 headers = { ["content-length"] = string.len(index) },
132 port = proxyp, 132 proxyport = proxyport,
133 host = proxyh 133 proxyhost = proxyhost
134} 134}
135expect = { 135expect = {
136 body = index, 136 body = index,
@@ -170,8 +170,8 @@ check_request(request, expect, ignore)
170io.write("testing proxy with redirection: ") 170io.write("testing proxy with redirection: ")
171request = { 171request = {
172 url = "http://" .. host .. prefix, 172 url = "http://" .. host .. prefix,
173 host = proxyh, 173 proxyhost = proxyhost,
174 port = proxyp 174 proxyport = proxyport
175} 175}
176expect = { 176expect = {
177 body = index, 177 body = index,
@@ -267,7 +267,7 @@ io.write("testing manual basic auth: ")
267request = { 267request = {
268 url = "http://" .. host .. prefix .. "/auth/index.html", 268 url = "http://" .. host .. prefix .. "/auth/index.html",
269 headers = { 269 headers = {
270 authorization = "Basic " .. (socket.code.b64("luasocket:password")) 270 authorization = "Basic " .. (socket.mime.b64("luasocket:password"))
271 } 271 }
272} 272}
273expect = { 273expect = {