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	Thu Feb 14 16:03:48 2008 +0000
+++ b/src/http/ngx_http_request.c	Fri Feb 15 12:46:40 2008 +0000
@@ -2448,7 +2448,12 @@
 
     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;
 }