diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-01-19 05:41:30 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-01-19 05:41:30 +0000 |
commit | 5b8d7dec541a618b4ca7f2205470a28cde2e3e25 (patch) | |
tree | 209ad0c80c9a938068401fc5b8fa51942972418f /test/httptest.lua | |
parent | 6ac82d50eecdf9bf55f4234ed3a5449afd7a2992 (diff) | |
download | luasocket-5b8d7dec541a618b4ca7f2205470a28cde2e3e25.tar.gz luasocket-5b8d7dec541a618b4ca7f2205470a28cde2e3e25.tar.bz2 luasocket-5b8d7dec541a618b4ca7f2205470a28cde2e3e25.zip |
Updated some of the callbacks in callback.lua.
Update get.lua to use the new callbacks.
The old "code" module is now the "mime" module.
Updated all modules that depended on it.
Updated url.lua to use the new namespace scheme, and moved the
escape and unescape functions that used to be in the code.lua module
to it, since these are specific to urls.
Updated the callback entries in the manual.
Diffstat (limited to 'test/httptest.lua')
-rw-r--r-- | test/httptest.lua | 16 |
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 |
6 | dofile("noglobals.lua") | 6 | dofile("noglobals.lua") |
7 | 7 | ||
8 | local host, proxyh, proxyp, request, response | 8 | local host, proxyhost, proxyport, request, response |
9 | local ignore, expect, index, prefix, cgiprefix | 9 | local ignore, expect, index, prefix, cgiprefix |
10 | 10 | ||
11 | local t = socket.time() | 11 | local t = socket.time() |
12 | 12 | ||
13 | host = host or "diego.princeton.edu" | 13 | host = host or "diego.princeton.edu" |
14 | proxyh = proxyh or "localhost" | 14 | proxyhost = proxyhost or "localhost" |
15 | proxyp = proxyp or 3128 | 15 | proxyport = proxyport or 3128 |
16 | prefix = prefix or "/luasocket-test" | 16 | prefix = prefix or "/luasocket-test" |
17 | cgiprefix = cgiprefix or "/luasocket-test-cgi" | 17 | cgiprefix = 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 | } |
135 | expect = { | 135 | expect = { |
136 | body = index, | 136 | body = index, |
@@ -170,8 +170,8 @@ check_request(request, expect, ignore) | |||
170 | io.write("testing proxy with redirection: ") | 170 | io.write("testing proxy with redirection: ") |
171 | request = { | 171 | request = { |
172 | url = "http://" .. host .. prefix, | 172 | url = "http://" .. host .. prefix, |
173 | host = proxyh, | 173 | proxyhost = proxyhost, |
174 | port = proxyp | 174 | proxyport = proxyport |
175 | } | 175 | } |
176 | expect = { | 176 | expect = { |
177 | body = index, | 177 | body = index, |
@@ -267,7 +267,7 @@ io.write("testing manual basic auth: ") | |||
267 | request = { | 267 | request = { |
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 | } |
273 | expect = { | 273 | expect = { |