diff src/http/ngx_http_request.c @ 1894:22e28e77246b

named locations in post_action
author Igor Sysoev <igor@sysoev.ru>
date Fri, 15 Feb 2008 12:46:40 +0000
parents 1ff400fed04d
children 291689a7e5dc
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;
 }