comparison src/http/modules/ngx_http_rewrite_module.c @ 527:7fa11e5c6e96 release-0.1.38

nginx-0.1.38-RELEASE import *) Feature: the "limit_rate" directive is supported in in proxy and FastCGI mode. *) Feature: the "X-Accel-Limit-Rate" response header line is supported in proxy and FastCGI mode. *) Feature: the "break" directive. *) Feature: the "log_not_found" directive. *) Bugfix: the response status code was not changed when request was redirected by the ""X-Accel-Redirect" header line. *) Bugfix: the variables set by the "set" directive could not be used in SSI. *) Bugfix: the segmentation fault may occurred if the SSI page has more than one remote subrequest. *) Bugfix: nginx treated the backend response as invalid if the status line in the header was transferred in two packets; the bug had appeared in 0.1.29. *) Feature: the "ssi_types" directive. *) Feature: the "autoindex_exact_size" directive. *) Bugfix: the ngx_http_autoindex_module did not support the long file names in UTF-8. *) Feature: the IMAP/POP3 proxy.
author Igor Sysoev <igor@sysoev.ru>
date Fri, 08 Jul 2005 14:34:20 +0000
parents 12234c998d83
children b09ee85d0ac8
comparison
equal deleted inserted replaced
526:e31ce4d8b8e6 527:7fa11e5c6e96
33 static char *ngx_http_rewrite_merge_loc_conf(ngx_conf_t *cf, 33 static char *ngx_http_rewrite_merge_loc_conf(ngx_conf_t *cf,
34 void *parent, void *child); 34 void *parent, void *child);
35 static ngx_int_t ngx_http_rewrite_init(ngx_cycle_t *cycle); 35 static ngx_int_t ngx_http_rewrite_init(ngx_cycle_t *cycle);
36 static char *ngx_http_rewrite(ngx_conf_t *cf, ngx_command_t *cmd, void *conf); 36 static char *ngx_http_rewrite(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
37 static char *ngx_http_rewrite_return(ngx_conf_t *cf, ngx_command_t *cmd, 37 static char *ngx_http_rewrite_return(ngx_conf_t *cf, ngx_command_t *cmd,
38 void *conf);
39 static char *ngx_http_rewrite_break(ngx_conf_t *cf, ngx_command_t *cmd,
38 void *conf); 40 void *conf);
39 static char *ngx_http_rewrite_if(ngx_conf_t *cf, ngx_command_t *cmd, 41 static char *ngx_http_rewrite_if(ngx_conf_t *cf, ngx_command_t *cmd,
40 void *conf); 42 void *conf);
41 static char * ngx_http_rewrite_if_condition(ngx_conf_t *cf, 43 static char * ngx_http_rewrite_if_condition(ngx_conf_t *cf,
42 ngx_http_rewrite_loc_conf_t *lcf); 44 ngx_http_rewrite_loc_conf_t *lcf);
64 ngx_http_rewrite_return, 66 ngx_http_rewrite_return,
65 NGX_HTTP_LOC_CONF_OFFSET, 67 NGX_HTTP_LOC_CONF_OFFSET,
66 0, 68 0,
67 NULL }, 69 NULL },
68 70
71 { ngx_string("break"),
72 NGX_HTTP_SRV_CONF|NGX_HTTP_SIF_CONF|NGX_HTTP_LOC_CONF|NGX_HTTP_LIF_CONF
73 |NGX_CONF_NOARGS,
74 ngx_http_rewrite_break,
75 NGX_HTTP_LOC_CONF_OFFSET,
76 0,
77 NULL },
78
69 { ngx_string("if"), 79 { ngx_string("if"),
70 NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_BLOCK|NGX_CONF_1MORE, 80 NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_BLOCK|NGX_CONF_1MORE,
71 ngx_http_rewrite_if, 81 ngx_http_rewrite_if,
72 NGX_HTTP_LOC_CONF_OFFSET, 82 NGX_HTTP_LOC_CONF_OFFSET,
73 0, 83 0,
599 return NGX_CONF_OK; 609 return NGX_CONF_OK;
600 } 610 }
601 611
602 612
603 static char * 613 static char *
614 ngx_http_rewrite_break(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
615 {
616 ngx_http_rewrite_loc_conf_t *lcf = conf;
617
618 ngx_http_script_code_pt *code;
619
620 code = ngx_http_script_start_code(cf->pool, &lcf->codes, sizeof(uintptr_t));
621 if (code == NULL) {
622 return NGX_CONF_ERROR;
623 }
624
625 *code = ngx_http_script_break_code;
626
627 return NGX_CONF_OK;
628 }
629
630
631 static char *
604 ngx_http_rewrite_if(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) 632 ngx_http_rewrite_if(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
605 { 633 {
606 ngx_http_rewrite_loc_conf_t *lcf = conf; 634 ngx_http_rewrite_loc_conf_t *lcf = conf;
607 635
608 void *mconf; 636 void *mconf;