diff options
author | Caleb Maclennan <caleb@alerque.com> | 2023-11-10 09:12:04 +0300 |
---|---|---|
committer | Caleb Maclennan <caleb@alerque.com> | 2023-11-10 09:12:04 +0300 |
commit | 5c4fc93d5f4137bf4c22ddf1a048c907a4a26727 (patch) | |
tree | a9a68e1f6a9c3bfe2b64fa1c3a4098865b7d3b5d /test/httptest.lua | |
parent | ccef3bc4e2aa6ee5b997a80aabb58f4ff0b0e98f (diff) | |
parent | 43a97b7f0053313b43906371dbdc226271e6c8ab (diff) | |
download | luasocket-hjelmeland-patch-1.tar.gz luasocket-hjelmeland-patch-1.tar.bz2 luasocket-hjelmeland-patch-1.zip |
Merge branch 'master' into hjelmeland-patch-1hjelmeland-patch-1
Diffstat (limited to 'test/httptest.lua')
-rw-r--r-- | test/httptest.lua | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/httptest.lua b/test/httptest.lua index 63ff921..3457b07 100644 --- a/test/httptest.lua +++ b/test/httptest.lua | |||
@@ -265,6 +265,37 @@ ignore = { | |||
265 | } | 265 | } |
266 | check_request(request, expect, ignore) | 266 | check_request(request, expect, ignore) |
267 | 267 | ||
268 | -- Use https://httpbin.org/#/Dynamic_data/get_base64__value_ for testing | ||
269 | ----------------------------------------------------- | ||
270 | io.write("testing absolute https redirection: ") | ||
271 | request = { | ||
272 | url = "https://httpbin.org/redirect-to?url=https://httpbin.org/base64/THVhIFNvY2tldA==" | ||
273 | } | ||
274 | expect = { | ||
275 | code = 200, | ||
276 | body = "Lua Socket" | ||
277 | } | ||
278 | ignore = { | ||
279 | status = 1, | ||
280 | headers = 1 | ||
281 | } | ||
282 | check_request(request, expect, ignore) | ||
283 | |||
284 | ----------------------------------------------------- | ||
285 | io.write("testing relative https redirection: ") | ||
286 | request = { | ||
287 | url = "https://httpbin.org/redirect-to?url=/base64/THVhIFNvY2tldA==" | ||
288 | } | ||
289 | expect = { | ||
290 | code = 200, | ||
291 | body = "Lua Socket" | ||
292 | } | ||
293 | ignore = { | ||
294 | status = 1, | ||
295 | headers = 1 | ||
296 | } | ||
297 | check_request(request, expect, ignore) | ||
298 | |||
268 | ------------------------------------------------------------------------ | 299 | ------------------------------------------------------------------------ |
269 | --[[ | 300 | --[[ |
270 | io.write("testing proxy with redirection: ") | 301 | io.write("testing proxy with redirection: ") |