Home
last modified time | relevance | path

Searched full:n (Results 1 – 25 of 440) sorted by relevance

12345678910>>...18

/civetweb-2.7.6/test/
Dtest.pl40 print "FAILED: @_\n";
87 print "OK\n";
97 print 'Executing: ', @_, "\n";
106 die "cannot exec [$cmdline]: $!\n";
137 $SIG{ALRM} = sub { die "timeout\n" };
144 foreach (split /\n/, $out) {
156 write_file($config, "access_log_file access.log\n" .
157 "listening_ports 127.0.0.1:12345\n");
159 o("GET /test/hello.txt HTTP/1.0\n\n", 'HTTP/1.1 200 OK', 'Loading config file');
179 o("GET /hello.txt HTTP/1.1\nConnection: close\nRange: bytes=3-50\r\n\r\n",
[all …]
Dpage4.lua11 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")
[all …]
Dresource_script_demo.lua14 mg.write("HTTP/1.0 500 OK\r\n")
15 mg.write("Connection: close\r\n")
16 mg.write("Content-Type: text/html; charset=utf-8\r\n")
17 mg.write("\r\n")
18 mg.write("<html><head><title>Civetweb Lua script resource handling test</title></head>\r\n")
19 mg.write("<body>\r\nServer error.<br>\r\n")
20 …rite("The server admin must make sure this script is available as URI " .. scriptUri .. "<br>\r\n")
21 …rite("The server admin must set the environment variable " .. envVar .. " to a directory.<br>\r\n")
22 mg.write("</body>\r\n</html>\r\n")
29 mg.write("HTTP/1.0 200 OK\r\n")
[all …]
Dpage2.lua1 mg.write("HTTP/1.0 200 OK\r\n")
2 mg.write("Content-Type: text/html\r\n")
3 mg.write("\r\n")
15 mg.write("<li>" .. name .. " available</li>\n")
17 mg.write("<li>" .. name .. " not available</li>\n")
23 mg.write("<ul>\n")
26 mg.write("<li>" .. tostring(k) .. ":</li>\n")
35 mg.write("<li>" .. tostring(k) .. " = " .. tostring(v) .. "</li>\n")
38 mg.write("</ul>\n")
42 mg.write("<li>" .. _VERSION .. " with the following standard libraries</li>\n")
[all …]
Dfilehandler.lua2 mg.write("HTTP/1.0 200 OK\r\n")
3 mg.write("Connection: close\r\n")
4 mg.write("Date: " .. os.date("%a, %d %b %Y %H:%M:%S GMT") .. "\r\n")
9 mg.write("HTTP/1.0 404 Not Found\r\n")
10 mg.write("Connection: close\r\n")
11 mg.write("Date: " .. os.date("%a, %d %b %Y %H:%M:%S GMT") .. "\r\n")
23 mg.write("\r\n")
42 mg.write("HTTP/1.0 500 Internal Server Error\r\n")
43 mg.write("Connection: close\r\n")
44 mg.write("Date: " .. os.date("%a, %d %b %Y %H:%M:%S GMT") .. "\r\n")
[all …]
Dpage_shared.lua1 mg.write("HTTP/1.0 200 OK\r\n")
2 mg.write("Connection: close\r\n")
3 mg.write("Cache-Control: no-cache, no-store, must-revalidate, max-age=0\r\n")
4 mg.write("Content-Type: text/plain\r\n")
5 mg.write("\r\n")
8 mg.write("\"shared\" does not exist\n")
11 mg.write("\"shared\" is not userdata\n")
16 mg.write("\nNumber:\n")
18 mg.write("Previous count was " .. tostring(x) .. " (type " .. type(x) .. ")\n")
22 mg.write("Store new count " .. tostring(x) .. " (type " .. type(x) .. ")\n")
[all …]
Dhandle_form.lua3 mg.write("HTTP/1.0 400 OK\r\n")
4 mg.write("Connection: close\r\n")
5 mg.write("Content-Type: text/plain; charset=utf-8\r\n")
6 mg.write("Cache-Control: max-age=0, must-revalidate\r\n")
7 mg.write("\r\n")
8 mg.write("Bad request\r\n\r\n")
13 mg.write("HTTP/1.0 200 OK\r\n")
14 mg.write("Connection: close\r\n")
15 mg.write("Content-Type: text/plain; charset=utf-8\r\n")
16 mg.write("Cache-Control: max-age=0, must-revalidate\r\n")
[all …]
Dcors.reply.lua5 mg.write("HTTP/1.0 200 OK\r\n")
6 mg.write("Connection: close\r\n")
7 mg.write("Content-Type: text/html; charset=utf-8\r\n")
8 mg.write("\r\n")
27 mg.write("HTTP/1.0 403 Forbidden\r\n")
28 mg.write("Connection: close\r\n")
29 mg.write("\r\n")
33 mg.write("HTTP/1.0 200 OK\r\n")
34 mg.write("Access-Control-Allow-Methods: PUT\r\n")
36 mg.write("Access-Control-Allow-Headers: " .. acrh .. "\r\n")
[all …]
Dpage_keep_alive_chunked.lua6 mg.write("HTTP/1.1 200 OK\r\n")
7 mg.write("Content-Type: text/html\r\n")
8 mg.write("Date: " .. now .. " GMT\r\n")
9 mg.write("Cache-Control: no-cache\r\n")
10 mg.write("Last-Modified: " .. now .. " GMT\r\n")
12 mg.write("Connection: close\r\n")
13 mg.write("\r\n")
19 mg.write("Connection: close\r\n")
20 mg.write("\r\n")
27 mg.write("Cache-Control: max-age=0, must-revalidate\r\n")
[all …]
/civetweb-2.7.6/test/ajax/
Djquery.js2n=[],r=e.document,i=Object.getPrototypeOf,o=n.slice,a=n.concat,s=n.push,u=n.indexOf,l={},c=l.toStr… function
/civetweb-2.7.6/examples/embedded_cpp/
Dembedded_cpp.cpp35 "text/html\r\nConnection: close\r\n\r\n"); in handleGet()
36 mg_printf(conn, "<html><body>\r\n"); in handleGet()
38 "<h2>This is an example text from a C++ handler</h2>\r\n"); in handleGet()
41 "href=\"a\">click here</a></p>\r\n"); in handleGet()
46 "name=\"param\" \\> (GET)</form>\r\n"); in handleGet()
51 "name=\"param\" \\> (POST)</form>\r\n"); in handleGet()
54 "href=\"a/b\">click here</a></p>\r\n"); in handleGet()
57 "href=\"xy.foo\">click here</a></p>\r\n"); in handleGet()
60 "href=\"ws\">click here</a></p>\r\n"); in handleGet()
62 "<p>To exit <a href=\"%s\">click here</a></p>\r\n", in handleGet()
[all …]
/civetweb-2.7.6/src/third_party/duktape-1.8.0/examples/cpp-exceptions/
Dcpp_exceptions.cpp49 printf("my_class instance created\n"); in my_class()
53 printf("my_class instance destroyed\n"); in ~my_class()
80 printf("Caught: %d\n", myvalue); in test2()
149 printf("*** test1 - duk_pcall()\n"); in main()
152 printf("--> rc=%ld (%s)\n", (long) rc, duk_safe_to_string(ctx, -1)); in main()
154 printf("\n"); in main()
156 printf("*** test1 - duk_safe_call()\n"); in main()
158 printf("--> rc=%ld (%s)\n", (long) rc, duk_safe_to_string(ctx, -1)); in main()
160 printf("\n"); in main()
162 printf("*** test1 - ecmascript try-catch\n"); in main()
[all …]
/civetweb-2.7.6/src/third_party/duktape-1.5.2/examples/cpp-exceptions/
Dcpp_exceptions.cpp49 printf("my_class instance created\n"); in my_class()
53 printf("my_class instance destroyed\n"); in ~my_class()
80 printf("Caught: %d\n", myvalue); in test2()
149 printf("*** test1 - duk_pcall()\n"); in main()
152 printf("--> rc=%ld (%s)\n", (long) rc, duk_safe_to_string(ctx, -1)); in main()
154 printf("\n"); in main()
156 printf("*** test1 - duk_safe_call()\n"); in main()
158 printf("--> rc=%ld (%s)\n", (long) rc, duk_safe_to_string(ctx, -1)); in main()
160 printf("\n"); in main()
162 printf("*** test1 - ecmascript try-catch\n"); in main()
[all …]
/civetweb-2.7.6/examples/embedded_c/
Dembedded_c.c55 "close\r\n\r\n"); in ExampleHandler()
108 mg_printf(conn, "</body></html>\n"); in ExampleHandler()
118 "text/plain\r\nConnection: close\r\n\r\n"); in ExitHandler()
119 mg_printf(conn, "Server will shut down.\n"); in ExitHandler()
120 mg_printf(conn, "Bye!\n"); in ExitHandler()
131 "close\r\n\r\n"); in AHandler()
134 mg_printf(conn, "</body></html>\n"); in AHandler()
144 "close\r\n\r\n"); in ABHandler()
147 mg_printf(conn, "</body></html>\n"); in ABHandler()
160 "close\r\n\r\n"); in BXHandler()
[all …]
/civetweb-2.7.6/unittest/
Dpublic_server.c186 fprintf(stderr, "Certificate %s not found\n", buf); in START_TEST()
253 printf("LOG_MSG_FUNC: %s\n", message); in log_msg_func()
265 printf("LOG_MESSAGE: %s\n", message); in test_log_message()
431 mg_printf(client_conn, "GET / HTTP/1.0\r\n\r\n"); in test_mg_start_stop_http_server_impl()
460 mg_printf(client_conn, "GET / HTTP/1.1\r\n"); in test_mg_start_stop_http_server_impl()
461 mg_printf(client_conn, "Host: localhost:8080\r\n"); in test_mg_start_stop_http_server_impl()
462 mg_printf(client_conn, "Connection: close\r\n\r\n"); in test_mg_start_stop_http_server_impl()
492 mg_printf(client_conn, "GET / HTTP/1.7\r\n"); in test_mg_start_stop_http_server_impl()
493 mg_printf(client_conn, "Host: localhost:8080\r\n"); in test_mg_start_stop_http_server_impl()
494 mg_printf(client_conn, "Connection: close\r\n\r\n"); in test_mg_start_stop_http_server_impl()
[all …]
/civetweb-2.7.6/test/scriptdir/
Dindex.lua1 mg.write("HTTP/1.1 200 OK\r\n")
2 mg.write("Connection: close\r\n")
3 mg.write("Content-Type: text/html\r\n")
4 mg.write("\r\n")
6 mg.write("<!DOCTYPE html>\r\n")
7 mg.write("<html>\r\n")
8 mg.write("<head>\r\n")
9 mg.write(" <meta charset=\"UTF-8\">\r\n")
10 mg.write(" <title>HTTP reflector</title>\r\n")
26 mg.write("</head>\r\n")
[all …]
/civetweb-2.7.6/src/third_party/lua-5.2.4/src/
Dltable.c12 ** part. The actual size of the array is the largest `n' such that at
13 ** least half the slots between 0 and n are in use.
51 #define hashpow2(t,n) (gnode(t, lmod((n), sizenode(t)))) argument
61 #define hashmod(t,n) (gnode(t, ((n) % ((sizenode(t)-1)|1)))) argument
69 #define isdummy(n) ((n) == dummynode) argument
80 static Node *hashnum (const Table *t, lua_Number n) { in hashnum() argument
82 luai_hashnum(i, n); in hashnum()
129 lua_Number n = nvalue(key); in arrayindex() local
131 lua_number2int(k, n); in arrayindex()
132 if (luai_numeq(cast_num(k), n)) in arrayindex()
[all …]
Dlundump.c36 #define LoadMem(S,b,n,size) LoadBlock(S,b,(n)*(size)) argument
39 #define LoadVector(S,b,n,size) LoadMem(S,b,n,size) argument
88 int n=LoadInt(S); in LoadCode() local
89 f->code=luaM_newvector(S->L,n,Instruction); in LoadCode()
90 f->sizecode=n; in LoadCode()
91 LoadVector(S,f->code,n,sizeof(Instruction)); in LoadCode()
98 int i,n; in LoadConstants() local
99 n=LoadInt(S); in LoadConstants()
100 f->k=luaM_newvector(S->L,n,TValue); in LoadConstants()
101 f->sizek=n; in LoadConstants()
[all …]
Dluac.c37 fprintf(stderr,"%s: %s\n",progname,message); in fatal()
43 fprintf(stderr,"%s: cannot %s %s: %s\n",progname,what,output,strerror(errno)); in cannot()
50 fprintf(stderr,"%s: unrecognized option " LUA_QS "\n",progname,message); in usage()
52 fprintf(stderr,"%s: %s\n",progname,message); in usage()
54 "usage: %s [options] [filenames]\n" in usage()
55 "Available options are:\n" in usage()
56 " -l list (use -l -l for full listing)\n" in usage()
57 " -o name output to file " LUA_QL("name") " (default is \"%s\")\n" in usage()
58 " -p parse only\n" in usage()
59 " -s strip debug information\n" in usage()
[all …]
/civetweb-2.7.6/src/third_party/lua-5.1.5/src/
Dltable.c12 ** part. The actual size of the array is the largest `n' such that at
13 ** least half the slots between 0 and n are in use.
50 #define hashpow2(t,n) (gnode(t, lmod((n), sizenode(t)))) argument
60 #define hashmod(t,n) (gnode(t, ((n) % ((sizenode(t)-1)|1)))) argument
84 static Node *hashnum (const Table *t, lua_Number n) { in hashnum() argument
87 if (luai_numeq(n, 0)) /* avoid problems with -0 */ in hashnum()
89 memcpy(a, &n, sizeof(a)); in hashnum()
122 lua_Number n = nvalue(key); in arrayindex() local
124 lua_number2int(k, n); in arrayindex()
125 if (luai_numeq(cast_num(k), n)) in arrayindex()
[all …]
Dlundump.c43 #define LoadMem(S,b,n,size) LoadBlock(S,b,(n)*(size)) argument
46 #define LoadVector(S,b,n,size) LoadMem(S,b,n,size) argument
92 int n=LoadInt(S); in LoadCode() local
93 f->code=luaM_newvector(S->L,n,Instruction); in LoadCode()
94 f->sizecode=n; in LoadCode()
95 LoadVector(S,f->code,n,sizeof(Instruction)); in LoadCode()
102 int i,n; in LoadConstants() local
103 n=LoadInt(S); in LoadConstants()
104 f->k=luaM_newvector(S->L,n,TValue); in LoadConstants()
105 f->sizek=n; in LoadConstants()
[all …]
/civetweb-2.7.6/src/third_party/lua-5.3.5/src/
Dluac.c40 fprintf(stderr,"%s: %s\n",progname,message); in fatal()
46 fprintf(stderr,"%s: cannot %s %s: %s\n",progname,what,output,strerror(errno)); in cannot()
53 fprintf(stderr,"%s: unrecognized option '%s'\n",progname,message); in usage()
55 fprintf(stderr,"%s: %s\n",progname,message); in usage()
57 "usage: %s [options] [filenames]\n" in usage()
58 "Available options are:\n" in usage()
59 " -l list (use -l -l for full listing)\n" in usage()
60 " -o name output to file 'name' (default is \"%s\")\n" in usage()
61 " -p parse only\n" in usage()
62 " -s strip debug information\n" in usage()
[all …]
Dlundump.c49 #define LoadVector(S,b,n) LoadBlock(S,b,(n)*sizeof((b)[0])) argument
108 int n = LoadInt(S); in LoadCode() local
109 f->code = luaM_newvector(S->L, n, Instruction); in LoadCode()
110 f->sizecode = n; in LoadCode()
111 LoadVector(S, f->code, n); in LoadCode()
120 int n = LoadInt(S); in LoadConstants() local
121 f->k = luaM_newvector(S->L, n, TValue); in LoadConstants()
122 f->sizek = n; in LoadConstants()
123 for (i = 0; i < n; i++) in LoadConstants()
125 for (i = 0; i < n; i++) { in LoadConstants()
[all …]
Dlapi.c97 LUA_API int lua_checkstack (lua_State *L, int n) { in lua_checkstack() argument
101 api_check(L, n >= 0, "negative 'n'"); in lua_checkstack()
102 if (L->stack_last - L->top > n) /* stack large enough? */ in lua_checkstack()
106 if (inuse > LUAI_MAXSTACK - n) /* can grow without overflow? */ in lua_checkstack()
109 res = (luaD_rawrunprotected(L, &growstack, &n) == LUA_OK); in lua_checkstack()
111 if (res && ci->top < L->top + n) in lua_checkstack()
112 ci->top = L->top + n; /* adjust frame top */ in lua_checkstack()
118 LUA_API void lua_xmove (lua_State *from, lua_State *to, int n) { in lua_xmove() argument
122 api_checknelems(from, n); in lua_xmove()
124 api_check(from, to->ci->top - to->top >= n, "stack overflow"); in lua_xmove()
[all …]
Dlutf8lib.c72 int n = 0; in utflen() local
89 n++; in utflen()
91 lua_pushinteger(L, n); in utflen()
105 int n; in codepoint() local
112 n = (int)(pose - posi) + 1; in codepoint()
113 luaL_checkstack(L, n, "string slice too long"); in codepoint()
114 n = 0; in codepoint()
122 n++; in codepoint()
124 return n; in codepoint()
139 int n = lua_gettop(L); /* number of arguments */ in utfchar() local
[all …]

12345678910>>...18