Mercurial > hg > nginx-site
comparison xml/en/docs/dev/development_guide.xml @ 2995:89ab7fc9fea5
Development guide: updated style in code examples.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Fri, 18 Aug 2023 15:41:06 +0400 |
parents | 537b98ec3c83 |
children | 1bb11d9ca0ba |
comparison
equal
deleted
inserted
replaced
2994:537b98ec3c83 | 2995:89ab7fc9fea5 |
---|---|
5599 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); | 5599 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); |
5600 return; | 5600 return; |
5601 } | 5601 } |
5602 | 5602 |
5603 b->last = ngx_sprintf(b->pos, "%O", len); | 5603 b->last = ngx_sprintf(b->pos, "%O", len); |
5604 b->last_buf = (r == r->main) ? 1: 0; | 5604 b->last_buf = (r == r->main) ? 1 : 0; |
5605 b->last_in_chain = 1; | 5605 b->last_in_chain = 1; |
5606 | 5606 |
5607 r->headers_out.status = NGX_HTTP_OK; | 5607 r->headers_out.status = NGX_HTTP_OK; |
5608 r->headers_out.content_length_n = b->last - b->pos; | 5608 r->headers_out.content_length_n = b->last - b->pos; |
5609 | 5609 |
6100 b = ngx_calloc_buf(r->pool); | 6100 b = ngx_calloc_buf(r->pool); |
6101 if (b == NULL) { | 6101 if (b == NULL) { |
6102 return NGX_ERROR; | 6102 return NGX_ERROR; |
6103 } | 6103 } |
6104 | 6104 |
6105 b->last_buf = (r == r->main) ? 1: 0; | 6105 b->last_buf = (r == r->main) ? 1 : 0; |
6106 b->last_in_chain = 1; | 6106 b->last_in_chain = 1; |
6107 | 6107 |
6108 b->memory = 1; | 6108 b->memory = 1; |
6109 | 6109 |
6110 b->pos = (u_char *) "foo"; | 6110 b->pos = (u_char *) "foo"; |