Mercurial > hg > nginx-ranges
comparison src/http/modules/ngx_http_stub_status_module.c @ 126:df17fbafec8f NGINX_0_3_10
nginx 0.3.10
*) Change: the "valid_referers" directive and the "$invalid_referer"
variable were moved to the new ngx_http_referer_module from the
ngx_http_rewrite_module.
*) Change: the "$apache_bytes_sent" variable name was changed to
"$body_bytes_sent".
*) Feature: the "$sent_http_..." variables.
*) Feature: the "if" directive supports the "=" and "!=" operations.
*) Feature: the "proxy_pass" directive supports the HTTPS protocol.
*) Feature: the "proxy_set_body" directive.
*) Feature: the "post_action" directive.
*) Feature: the ngx_http_empty_gif_module.
*) Feature: the "worker_cpu_affinity" directive for Linux.
*) Bugfix: the "rewrite" directive did not unescape URI part in
redirect, now it is unescaped except the %00-%25 and %7F-%FF
characters.
*) Bugfix: nginx could not be built by the icc 9.0 compiler.
*) Bugfix: if the SSI was enabled for zero size static file, then the
chunked response was encoded incorrectly.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 15 Nov 2005 00:00:00 +0300 |
parents | 71c46860eb55 |
children | fa32d59d9a15 |
comparison
equal
deleted
inserted
replaced
125:97504de1f89e | 126:df17fbafec8f |
---|---|
1 | |
2 /* | |
3 * Copyright (C) Igor Sysoev | |
4 */ | |
5 | |
1 | 6 |
2 #include <ngx_config.h> | 7 #include <ngx_config.h> |
3 #include <ngx_core.h> | 8 #include <ngx_core.h> |
4 #include <ngx_http.h> | 9 #include <ngx_http.h> |
5 | 10 |
6 | 11 |
7 static char *ngx_http_set_status(ngx_conf_t *cf, ngx_command_t *cmd, | 12 static char *ngx_http_set_status(ngx_conf_t *cf, ngx_command_t *cmd, |
8 void *conf); | 13 void *conf); |
9 | 14 |
10 static ngx_command_t ngx_http_status_commands[] = { | 15 static ngx_command_t ngx_http_status_commands[] = { |
11 | 16 |
12 { ngx_string("stub_status"), | 17 { ngx_string("stub_status"), |
13 NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, | 18 NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG, |
14 ngx_http_set_status, | 19 ngx_http_set_status, |
15 0, | 20 0, |
16 0, | 21 0, |
17 NULL }, | 22 NULL }, |
18 | 23 |
19 ngx_null_command | 24 ngx_null_command |
20 }; | 25 }; |
21 | 26 |
22 | 27 |
23 | 28 |
24 ngx_http_module_t ngx_http_stub_status_module_ctx = { | 29 ngx_http_module_t ngx_http_stub_status_module_ctx = { |
25 NULL, /* preconfiguration */ | 30 NULL, /* preconfiguration */ |
26 NULL, /* postconfiguration */ | 31 NULL, /* postconfiguration */ |
27 | 32 |
28 NULL, /* create main configuration */ | 33 NULL, /* create main configuration */ |
29 NULL, /* init main configuration */ | 34 NULL, /* init main configuration */ |
30 | 35 |
31 NULL, /* create server configuration */ | 36 NULL, /* create server configuration */ |
32 NULL, /* merge server configuration */ | 37 NULL, /* merge server configuration */ |
33 | 38 |
34 NULL, /* create location configuration */ | 39 NULL, /* create location configuration */ |
35 NULL /* merge location configuration */ | 40 NULL /* merge location configuration */ |
36 }; | 41 }; |
37 | 42 |
38 | 43 |
57 size_t size; | 62 size_t size; |
58 ngx_int_t rc; | 63 ngx_int_t rc; |
59 ngx_buf_t *b; | 64 ngx_buf_t *b; |
60 ngx_chain_t out; | 65 ngx_chain_t out; |
61 ngx_atomic_int_t ap, hn, ac, rq, rd, wr; | 66 ngx_atomic_int_t ap, hn, ac, rq, rd, wr; |
62 | 67 |
63 if (r->method != NGX_HTTP_GET && r->method != NGX_HTTP_HEAD) { | 68 if (r->method != NGX_HTTP_GET && r->method != NGX_HTTP_HEAD) { |
64 return NGX_HTTP_NOT_ALLOWED; | 69 return NGX_HTTP_NOT_ALLOWED; |
65 } | 70 } |
66 | 71 |
67 rc = ngx_http_discard_body(r); | 72 rc = ngx_http_discard_body(r); |