null+****@clear*****
null+****@clear*****
2012年 7月 25日 (水) 17:41:33 JST
Kouhei Sutou 2012-07-25 17:41:33 +0900 (Wed, 25 Jul 2012) New Revision: 91e923b64f2f59fdf2aad46aeadfdad30c678633 https://github.com/groonga/groonga/commit/91e923b64f2f59fdf2aad46aeadfdad30c678633 Log: httpd: check HTTP method at the first Modified files: src/nginx-module/ngx_http_groonga_module.c Modified: src/nginx-module/ngx_http_groonga_module.c (+5 -5) =================================================================== --- src/nginx-module/ngx_http_groonga_module.c 2012-07-25 17:40:55 +0900 (e5341e3) +++ src/nginx-module/ngx_http_groonga_module.c 2012-07-25 17:41:33 +0900 (020b48f) @@ -323,16 +323,16 @@ ngx_http_groonga_handler(ngx_http_request_t *r) ngx_int_t rc; ngx_http_groonga_handler_data_t *data; - rc = ngx_http_groonga_handler_process_request(r, &data); - if (rc != NGX_OK) { - return rc; - } - /* we response to 'GET' and 'HEAD' requests only */ if (!(r->method & (NGX_HTTP_GET|NGX_HTTP_HEAD))) { return NGX_HTTP_NOT_ALLOWED; } + rc = ngx_http_groonga_handler_process_request(r, &data); + if (rc != NGX_OK) { + return rc; + } + /* discard request body, since we don't need it here */ rc = ngx_http_discard_request_body(r); if (rc != NGX_OK) { -------------- next part -------------- HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B... Descargar