[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-cvs
Subject: svn commit: r1195167 - /httpd/httpd/trunk/modules/lua/lua_request.c
From: covener () apache ! org
Date: 2011-10-30 14:19:46
Message-ID: 20111030141946.2FD5C238889B () eris ! apache ! org
[Download RAW message or body]
Author: covener
Date: Sun Oct 30 14:19:45 2011
New Revision: 1195167
URL: http://svn.apache.org/viewvc?rev=1195167&view=rev
Log:
alphabetize writable lua properties and use strcmp() for the oddball that's
just testing quality of "user".
Modified:
httpd/httpd/trunk/modules/lua/lua_request.c
Modified: httpd/httpd/trunk/modules/lua/lua_request.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/lua_request.c?rev=1195167&r1=1195166&r2=1195167&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/lua/lua_request.c (original)
+++ httpd/httpd/trunk/modules/lua/lua_request.c Sun Oct 30 14:19:45 2011
@@ -462,9 +462,10 @@ static int req_newindex(lua_State *L)
/* const char* key = luaL_checkstring(L, -2); */
request_rec *r = ap_lua_check_request_rec(L, 1);
key = luaL_checkstring(L, 2);
- if (0 == strcmp("status", key)) {
- int code = luaL_checkinteger(L, 3);
- r->status = code;
+
+ if (0 == strcmp("args", key)) {
+ const char *value = luaL_checkstring(L, 3);
+ r->args = apr_pstrdup(r->pool, value);
return 0;
}
@@ -480,19 +481,19 @@ static int req_newindex(lua_State *L)
return 0;
}
- if (0 == strcmp("uri", key)) {
- const char *value = luaL_checkstring(L, 3);
- r->uri = apr_pstrdup(r->pool, value);
+ if (0 == strcmp("status", key)) {
+ int code = luaL_checkinteger(L, 3);
+ r->status = code;
return 0;
}
- if (0 == strcmp("args", key)) {
+ if (0 == strcmp("uri", key)) {
const char *value = luaL_checkstring(L, 3);
- r->args = apr_pstrdup(r->pool, value);
+ r->uri = apr_pstrdup(r->pool, value);
return 0;
}
- if (0 == apr_strnatcmp("user", key)) {
+ if (0 == strcmp("user", key)) {
const char *value = luaL_checkstring(L, 3);
r->user = apr_pstrdup(r->pool, value);
return 0;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic