aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2004-03-26 06:05:20 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2004-03-26 06:05:20 +0000
commite5a090b01cd5b490f7331235b7c58c36c05bb7b6 (patch)
tree8f98ae6217650ac0b9d1c04f1ad1d3fb77af3d37 /test
parente77f1792005088f55353c6c85fe9335e60772754 (diff)
downloadluasocket-e5a090b01cd5b490f7331235b7c58c36c05bb7b6.tar.gz
luasocket-e5a090b01cd5b490f7331235b7c58c36c05bb7b6.tar.bz2
luasocket-e5a090b01cd5b490f7331235b7c58c36c05bb7b6.zip
Using socket pumps in http.lua.
Adjusted socket.try.
Diffstat (limited to 'test')
-rw-r--r--test/httptest.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/httptest.lua b/test/httptest.lua
index 4ec0cc1..c16ef2b 100644
--- a/test/httptest.lua
+++ b/test/httptest.lua
@@ -411,6 +411,7 @@ local body
411io.write("testing simple get function: ") 411io.write("testing simple get function: ")
412body = socket.http.get("http://" .. host .. prefix .. "/index.html") 412body = socket.http.get("http://" .. host .. prefix .. "/index.html")
413assert(body == index) 413assert(body == index)
414print("ok")
414 415
415------------------------------------------------------------------------ 416------------------------------------------------------------------------
416io.write("testing HEAD method: ") 417io.write("testing HEAD method: ")
@@ -420,6 +421,7 @@ response = socket.http.request {
420 url = "http://www.cs.princeton.edu/~diego/" 421 url = "http://www.cs.princeton.edu/~diego/"
421} 422}
422assert(response and response.headers) 423assert(response and response.headers)
424print("ok")
423 425
424------------------------------------------------------------------------ 426------------------------------------------------------------------------
425print("passed all tests") 427print("passed all tests")