Permalink
Browse files

Merge branch 'master' of github.com:chaoslawful/lua-nginx-module

  • Loading branch information...
agentzh committed Mar 14, 2012
2 parents b4c2a37 + 1dc6c21 commit c9c5f9486f60941972acce576c1509fd6eabaa4b
@@ -28,7 +28,7 @@ ngx_http_lua_access_handler(ngx_http_request_t *r)
lmcf = ngx_http_get_module_main_conf(r, ngx_http_lua_module);
- if (! lmcf->postponed_to_access_phase_end) {
+ if (!lmcf->postponed_to_access_phase_end) {
ngx_http_core_main_conf_t *cmcf;
ngx_http_phase_handler_t tmp;
ngx_http_phase_handler_t *ph;
View
@@ -312,7 +312,7 @@ ngx_http_lua_parse_args(ngx_http_request_t *r, lua_State *L, u_char *buf,
lua_pushlstring(L, (char *) q, dst - q);
- if (! parsing_value) {
+ if (!parsing_value) {
dd("pushing boolean true...");
lua_pushboolean(L, 1);
}
View
@@ -36,7 +36,7 @@ ngx_http_lua_cache_load_code(lua_State *L, const char *key)
dd("Code cache table to load: %p", lua_topointer(L, -1));
- if (! lua_istable(L, -1)) {
+ if (!lua_istable(L, -1)) {
dd("Error: code cache table to load did not exist!!");
return NGX_ERROR;
}
@@ -89,7 +89,7 @@ ngx_http_lua_cache_store_code(lua_State *L, const char *key)
dd("Code cache table to store: %p", lua_topointer(L, -1));
- if (! lua_istable(L, -1)) {
+ if (!lua_istable(L, -1)) {
dd("Error: code cache table to load did not exist!!");
return NGX_ERROR;
}
@@ -120,7 +120,7 @@ ngx_http_lua_cache_loadbuffer(lua_State *L, const u_char *src, size_t src_len,
dd("XXX cache key: [%s]", cache_key);
- if (! enabled) {
+ if (!enabled) {
ngx_http_lua_clear_package_loaded(L);
}
@@ -114,7 +114,7 @@ ngx_http_lua_code_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
fp = (ngx_flag_t *) (p + cmd->offset);
- if (! *fp) {
+ if (!*fp) {
ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
"lua_code_cache is off; this will hurt performance");
}
@@ -383,7 +383,7 @@ ngx_http_lua_rewrite_by_lua(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
llcf->rewrite_handler = cmd->post;
- if (! ngx_http_lua_requires_rewrite) {
+ if (!ngx_http_lua_requires_rewrite) {
ngx_http_lua_requires_rewrite = 1;
ngx_http_lua_requires_capture_filter = 1;
}
@@ -464,7 +464,7 @@ ngx_http_lua_access_by_lua(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
llcf->access_handler = cmd->post;
- if (! ngx_http_lua_requires_access) {
+ if (!ngx_http_lua_requires_access) {
ngx_http_lua_requires_access = 1;
ngx_http_lua_requires_capture_filter = 1;
}
@@ -185,7 +185,7 @@ ngx_http_lua_ngx_header_set(lua_State *L)
key.len = len;
- if (! ctx->headers_set) {
+ if (!ctx->headers_set) {
rc = ngx_http_set_content_type(r);
if (rc != NGX_OK) {
return luaL_error(L,
@@ -34,7 +34,7 @@ ngx_http_lua_rewrite_handler(ngx_http_request_t *r)
lmcf = ngx_http_get_module_main_conf(r, ngx_http_lua_module);
- if (! lmcf->postponed_to_rewrite_phase_end) {
+ if (!lmcf->postponed_to_rewrite_phase_end) {
ngx_http_core_main_conf_t *cmcf;
ngx_http_phase_handler_t tmp;
ngx_http_phase_handler_t *ph;
@@ -257,7 +257,7 @@ ngx_http_lua_script_compile(ngx_http_lua_script_compile_t *sc)
goto invalid_variable;
}
- if (! num_var) {
+ if (!num_var) {
ngx_log_error(NGX_LOG_ERR, sc->log, 0,
"attempt to use named capturing variable "
"\"%V\" (named captures not supported yet)", &name);
@@ -1127,7 +1127,8 @@ ngx_http_lua_handle_subreq_responses(ngx_http_request_t *r,
lua_rawset(cc, -3); /* stack: table */
} else {
- if (! lua_istable(cc, -1)) { /* already inserted one value */
+
+ if (!lua_istable(cc, -1)) { /* already inserted one value */
lua_createtable(cc, 4, 0);
/* stack: table key value table */
View
@@ -98,7 +98,7 @@ ngx_http_lua_new_state(ngx_conf_t *cf, ngx_http_lua_main_conf_t *lmcf)
lua_getglobal(L, "package");
- if (! lua_istable(L, -1)) {
+ if (!lua_istable(L, -1)) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"the \"package\" table does not exist");
return NULL;
@@ -319,16 +319,16 @@ ngx_http_lua_send_header_if_needed(ngx_http_request_t *r,
{
ngx_int_t rc;
- if ( ! ctx->headers_sent ) {
+ if (!ctx->headers_sent ) {
if (r->headers_out.status == 0) {
r->headers_out.status = NGX_HTTP_OK;
}
- if (! ctx->headers_set && ngx_http_set_content_type(r) != NGX_OK) {
+ if (!ctx->headers_set && ngx_http_set_content_type(r) != NGX_OK) {
return NGX_HTTP_INTERNAL_SERVER_ERROR;
}
- if (! ctx->headers_set) {
+ if (!ctx->headers_set) {
ngx_http_clear_content_length(r);
ngx_http_clear_accept_ranges(r);
}
@@ -1288,7 +1288,7 @@ ngx_http_lua_set_multi_value_table(lua_State *L, int index)
lua_rawset(L, index); /* stack: table */
} else {
- if (! lua_istable(L, -1)) {
+ if (!lua_istable(L, -1)) {
/* just inserted one value */
lua_createtable(L, 4, 0);
/* stack: table key value value table */
@@ -205,7 +205,7 @@ ngx_http_lua_var_set(lua_State *L)
v = ngx_hash_find(&cmcf->variables_hash, hash, name.data, name.len);
if (v) {
- if (! (v->flags & NGX_HTTP_VAR_CHANGEABLE)) {
+ if (!(v->flags & NGX_HTTP_VAR_CHANGEABLE)) {
return luaL_error(L, "variable \"%s\" not changeable", lowcase);
}

0 comments on commit c9c5f94

Please sign in to comment.