Lines Matching full:n

11 mg.write("HTTP/1.0 200 OK\r\n")
12 mg.write("Connection: close\r\n")
13 mg.write("Content-Type: text/html; charset=utf-8\r\n")
14 mg.write("Cache-Control: max-age=0, must-revalidate\r\n")
16 mg.write("Set-Cookie: " .. cookie_name .. "=" .. tostring(now) .. "\r\n")
18 mg.write("\r\n")
20 mg.write("<html>\r\n<head><title>CivetWeb Lua script test page 4</title></head>\r\n<body>\r\n")
21 mg.write("<p>Test of CivetWeb Lua Functions:</p>\r\n");
22 mg.write("<pre>\r\n");
25 mg.write("get_var test (check query string):\r\n")
27 …a1&amp;junk&amp;b=b2&amp;cc=cNotSet&amp;d=a, b and d should be set&amp;z=z'>this example</a>.\r\n")
32 mg.write(" Variable " .. var .. ": value " .. value .. "\r\n");
34 mg.write(" Variable " .. var .. " not set\r\n");
38 mg.write("\r\n")
41 mg.write("MD5 test:\r\n")
45 mg.write(", MD5 " .. test_md5 .. "\r\n")
47 mg.write(" MD5 of empty string OK\r\n")
49 mg.write(" Error: MD5 of empty string NOT OK\r\n")
52 mg.write(" MD5 of test string OK\r\n")
54 mg.write(" Error: MD5 of test string NOT OK\r\n")
56 mg.write("\r\n")
59 mg.write("Cookie test:\r\n")
61 mg.write(" Cookie not set yet. Please reload the page.\r\n")
63 mg.write(" Cookie set to " .. cookie_value .. "\r\n")
64 mg.write(" You visited this page " .. os.difftime(now, cookie_value) .. " seconds before.\r\n")
66 mg.write("\r\n")
69 mg.write("require test\r\n")
73 mg.write(" Lua search path: " .. package.path .. "\r\n")
82 mg.write("\r\n")
85 mg.write(" 'require' test failed (htmlEscape)\r\n")
88 mg.write("\r\n")
91 mg.write(" " .. ht[i] .. "\r\n")
94 mg.write(" 'require' test failed (HugeText)\r\n")
97 mg.write(" name match failed\r\n")
99 mg.write("\r\n")
102 mg.write("HTTP helper methods test:\r\n")
104 mg.write(" htmlEscape test OK\r\n")
106 mg.write(" Error: htmlEscape test NOT OK\r\n")
109 mg.write(" get_response_code_text test OK\r\n")
111 mg.write(" Error: get_response_code_text test NOT OK\r\n")
113 mg.write("\r\n")
116 mg.write("URL encode/decode test:\r\n")
118 mg.write(" url_encode of empty string OK\r\n")
120 mg.write(" Error: url_encode of empty string NOT OK\r\n")
123 mg.write(" original string: " .. htmlEscape(raw_string) .. "\r\n")
126 mg.write(" mg-url: " .. htmlEscape(mg_string) .. "\r\n")
127 mg.write(" reference url: " .. htmlEscape(ref_string) .. "\r\n")
130 mg.write(" decoded mg-url: " .. htmlEscape(dec_mg_string) .. "\r\n")
131 mg.write(" decoded reference url: " .. htmlEscape(dec_ref_string) .. "\r\n")
134 mg.write(" decoded mg-url: " .. htmlEscape(dec_mg_string) .. "\r\n")
135 mg.write(" decoded reference url: " .. htmlEscape(dec_ref_string) .. "\r\n")
138 mg.write(" decoded mg-url: " .. htmlEscape(dec_mg_string) .. "\r\n")
139 mg.write(" decoded reference url: " .. htmlEscape(dec_ref_string) .. "\r\n")
140 mg.write("\r\n")
143 mg.write("BASE64 encode/decode test:\r\n")
145 mg.write(" original string: " .. htmlEscape(raw_string) .. "\r\n")
148 mg.write(" mg-base64: " .. htmlEscape(mg_string) .. "\r\n")
149 mg.write(" reference base64: " .. htmlEscape(ref_string) .. "\r\n")
152 mg.write(" decoded mg-base64: " .. htmlEscape(dec_mg_string) .. "\r\n")
153 mg.write(" decoded reference base64: " .. htmlEscape(dec_ref_string) .. "\r\n")
154 mg.write("\r\n")
156 mg.write(" original string: " .. htmlEscape(raw_string) .. "\r\n")
159 mg.write(" mg-base64: " .. htmlEscape(mg_string) .. "\r\n")
160 mg.write(" reference base64: " .. htmlEscape(ref_string) .. "\r\n")
163 mg.write(" decoded mg-base64: " .. htmlEscape(dec_mg_string) .. "\r\n")
164 mg.write(" decoded reference base64: " .. htmlEscape(dec_ref_string) .. "\r\n")
165 mg.write("\r\n")
168 mg.write("Random numbers:\r\n")
169 for i=1,10 do mg.write(string.format("%18u\r\n", mg.random())) end
170 mg.write("\r\n")
174 mg.write("UUIDs:\r\n")
175 for i=1,10 do mg.write(string.format("%40s\r\n", mg.uuid())) end
176 mg.write("\r\n")
180 mg.write("</pre>\r\n</body>\r\n</html>\r\n")