Using socket pumps in http.lua.

Adjusted socket.try.
This commit is contained in:
Diego Nehab 2004-03-26 06:05:20 +00:00
parent e77f179200
commit e5a090b01c
5 changed files with 41 additions and 124 deletions

View file

@ -411,6 +411,7 @@ local body
io.write("testing simple get function: ")
body = socket.http.get("http://" .. host .. prefix .. "/index.html")
assert(body == index)
print("ok")
------------------------------------------------------------------------
io.write("testing HEAD method: ")
@ -420,6 +421,7 @@ response = socket.http.request {
url = "http://www.cs.princeton.edu/~diego/"
}
assert(response and response.headers)
print("ok")
------------------------------------------------------------------------
print("passed all tests")