Mercurial > hg > nginx-site
comparison xml/en/docs/dev/development_guide.xml @ 1971:5fb870087b76
Fixed typo and removed trailing spaces.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Fri, 21 Apr 2017 12:48:01 +0300 |
parents | a1d29eda04b6 |
children | 459a6f194fcf |
comparison
equal
deleted
inserted
replaced
1970:a1d29eda04b6 | 1971:5fb870087b76 |
---|---|
4088 <link doc="../http/ngx_http_access_module.xml">ngx_http_access_module</link> and | 4088 <link doc="../http/ngx_http_access_module.xml">ngx_http_access_module</link> and |
4089 <link doc="../http/ngx_http_auth_basic_module.xml">ngx_http_auth_basic_module | 4089 <link doc="../http/ngx_http_auth_basic_module.xml">ngx_http_auth_basic_module |
4090 </link> register their handlers at this phase. | 4090 </link> register their handlers at this phase. |
4091 If configured so by the | 4091 If configured so by the |
4092 <link doc="../http/ngx_http_core_module.xml" id="satisfy"/> directive, only one | 4092 <link doc="../http/ngx_http_core_module.xml" id="satisfy"/> directive, only one |
4093 of access phase handlers may allow access to the request in order to confinue | 4093 of access phase handlers may allow access to the request in order to continue |
4094 processing | 4094 processing |
4095 </listitem> | 4095 </listitem> |
4096 | 4096 |
4097 <listitem> | 4097 <listitem> |
4098 <literal>NGX_HTTP_POST_ACCESS_PHASE</literal> — a special phase for the | 4098 <literal>NGX_HTTP_POST_ACCESS_PHASE</literal> — a special phase for the |
5243 <literal>ngx_http_send_header(r)</literal>. | 5243 <literal>ngx_http_send_header(r)</literal>. |
5244 Prior to calling this function, <literal>r->headers_out</literal> should contain | 5244 Prior to calling this function, <literal>r->headers_out</literal> should contain |
5245 all the data required to produce the HTTP response header. | 5245 all the data required to produce the HTTP response header. |
5246 It's always required to set the <literal>status</literal> field of | 5246 It's always required to set the <literal>status</literal> field of |
5247 <literal>r->headers_out</literal>. | 5247 <literal>r->headers_out</literal>. |
5248 If the response status suggests that a response body follows the header, | 5248 If the response status suggests that a response body follows the header, |
5249 <literal>content_length_n</literal> can be set as well. | 5249 <literal>content_length_n</literal> can be set as well. |
5250 The default value for this field is -1, which means that the body size is | 5250 The default value for this field is -1, which means that the body size is |
5251 unknown. | 5251 unknown. |
5252 In this case, chunked transfer encoding is used. | 5252 In this case, chunked transfer encoding is used. |
5253 To output an arbitrary header, <literal>headers</literal> list should be | 5253 To output an arbitrary header, <literal>headers</literal> list should be |
5365 static ngx_int_t | 5365 static ngx_int_t |
5366 ngx_http_foo_header_filter(ngx_http_request_t *r) | 5366 ngx_http_foo_header_filter(ngx_http_request_t *r) |
5367 { | 5367 { |
5368 ngx_table_elt_t *h; | 5368 ngx_table_elt_t *h; |
5369 | 5369 |
5370 /* | 5370 /* |
5371 * The filter handler adds "X-Foo: foo" header | 5371 * The filter handler adds "X-Foo: foo" header |
5372 * to every HTTP 200 response | 5372 * to every HTTP 200 response |
5373 */ | 5373 */ |
5374 | 5374 |
5375 if (r->headers_out.status != NGX_HTTP_OK) { | 5375 if (r->headers_out.status != NGX_HTTP_OK) { |