aboutsummaryrefslogtreecommitdiff
path: root/test/httptest.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/httptest.lua')
-rw-r--r--test/httptest.lua17
1 files changed, 16 insertions, 1 deletions
diff --git a/test/httptest.lua b/test/httptest.lua
index c05b4cc..92528b2 100644
--- a/test/httptest.lua
+++ b/test/httptest.lua
@@ -22,7 +22,8 @@ http.TIMEOUT = 10
22 22
23local t = socket.gettime() 23local t = socket.gettime()
24 24
25host = host or "diego.student.princeton.edu" 25--host = host or "diego.student.princeton.edu"
26host = host or "dell-diego"
26proxy = proxy or "http://localhost:3128" 27proxy = proxy or "http://localhost:3128"
27prefix = prefix or "/luasocket-test" 28prefix = prefix or "/luasocket-test"
28cgiprefix = cgiprefix or "/luasocket-test-cgi" 29cgiprefix = cgiprefix or "/luasocket-test-cgi"
@@ -125,6 +126,20 @@ assert(r == nil and e == re, tostring(r) ..", " .. tostring(re) ..
125 " vs " .. tostring(e)) 126 " vs " .. tostring(e))
126print("ok") 127print("ok")
127 128
129io.write("testing invalid empty port: ")
130request = {
131 url = "http://" .. host .. ":" .. prefix .. "/index.html"
132}
133expect = {
134 body = index,
135 code = 200
136}
137ignore = {
138 status = 1,
139 headers = 1
140}
141check_request(request, expect, ignore)
142
128------------------------------------------------------------------------ 143------------------------------------------------------------------------
129io.write("testing post method: ") 144io.write("testing post method: ")
130-- wanted to test chunked post, but apache doesn't support it... 145-- wanted to test chunked post, but apache doesn't support it...