changeset 1894:22e28e77246b

named locations in post_action
author Igor Sysoev <igor@sysoev.ru>
date Fri, 15 Feb 2008 12:46:40 +0000
parents 685048830623
children 2e3353955c32
files src/http/ngx_http_request.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -2448,7 +2448,12 @@ ngx_http_post_action(ngx_http_request_t 
 
     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;
 }