Mercurial Hosting > luan
comparison http/src/luan/modules/http/Http_test.luan @ 629:35dde32c02ab 0.15
change String.matches()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 18 Jan 2016 23:07:52 -0700 |
parents | 1e69d9c21461 |
children | ca169567ce07 |
comparison
equal
deleted
inserted
replaced
628:6510de302f95 | 629:35dde32c02ab |
---|---|
11 | 11 |
12 M.welcome_file = "index.html" | 12 M.welcome_file = "index.html" |
13 M.cookie = {} | 13 M.cookie = {} |
14 | 14 |
15 function M.get_page(path) | 15 function M.get_page(path) |
16 if M.welcome_file ~= nil and matches(path,".*/") then | 16 if M.welcome_file ~= nil and matches(path,"/$") then |
17 path = path .. M.welcome_file | 17 path = path .. M.welcome_file |
18 end | 18 end |
19 local old_out = Io.stdout | 19 local old_out = Io.stdout |
20 local mod = require("site:"..path) | 20 local mod = require("site:"..path) |
21 mod() | 21 mod() |