Using socket pumps in http.lua.
Adjusted socket.try.
This commit is contained in:
parent
e77f179200
commit
e5a090b01c
5 changed files with 41 additions and 124 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue