]> git.kaiwu.me - nginx.git/commitdiff
named locations in post_action
authorIgor Sysoev <igor@sysoev.ru>
Fri, 15 Feb 2008 12:46:40 +0000 (12:46 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Fri, 15 Feb 2008 12:46:40 +0000 (12:46 +0000)
src/http/ngx_http_request.c

index 4d21a002a82648c515a15a277007053a7fdbdef9..8c72659d3fe65c492fa754a454aa3b053e963d98 100644 (file)
@@ -2448,7 +2448,12 @@ ngx_http_post_action(ngx_http_request_t *r)
 
     r->read_event_handler = ngx_http_block_reading;
 
-    ngx_http_internal_redirect(r, &clcf->post_action, NULL);
+    if (clcf->post_action.data[0] == '/') {
+        ngx_http_internal_redirect(r, &clcf->post_action, NULL);
+
+    } else {
+        ngx_http_named_location(r, &clcf->post_action);
+    }
 
     return NGX_OK;
 }