~ubuntu-branches/ubuntu/trusty/nginx/trusty-updates

« back to all changes in this revision

Viewing changes to debian/modules/nginx-echo/src/ngx_http_echo_filter.c

  • Committer: Package Import Robot
  • Author(s): Kartik Mistry, Cyril Lavier, Michael Lustfield, Kartik Mistry
  • Date: 2012-05-14 11:15:00 UTC
  • mfrom: (4.2.49 sid)
  • Revision ID: package-import@ubuntu.com-20120514111500-1y9ij7zulu9xnmry
Tags: 1.2.0-1
[Cyril Lavier]
* New upstream release. (Closes: #670306)
  + 1.2.x is stable release now.
* debian/modules/chunkin-nginx-module:
  + Updated chunkin-nginx-module to v0.23rc2-3-g85eca98.
* debian/modules/headers-more-module:
  + Updated headers-more-module to v0.17rc1-4-g33a82ed.
* debian/modules/nginx-development-kit:
  + Updated nginx-development-kit to v0.2.17-7-g24202b4.
* debian/modules/nginx-echo:
  + Updated nginx-echo to v0.38rc2-7-g080c0a1.
* debian/modules/nginx-lua:
  + Updated nginx-lua to v0.5.0rc25-5-g8d28785.
* debian/modules/nginx-upstream-fair:
  + Updated nginx-upstream-fair to a18b409.
* debian/modules/nginx-upload-progress:
  + Updated nginx-upload-progress to v0.9.0-0-ga788dea.
* debian/modules/naxsi:
  + Updated naxsi to 0.46
* debian/modules/README.Modules-versions:
  + Updated versions and URLs for modules.
* debian/naxsi-ui-extract, debian/naxsi-ui-intercept,
  debian/nginx-naxsi-ui.*, debian/naxsi-ui-extract.1,
  debian/naxsi-ui-intercept.1, debian/rules:
  + Added nginx-naxsi-ui package containing the learning daemon
    and the WebUI.
* debian/nginx-common.nginx.default, debian/nginx-common.nginx.init:
  + Renamed files to be compliant with the nginx-naxsi-ui package.
* debian/po:
  + Added needed files for using po-debconf.
  + Added French translation.
* debian/control:
  + Applied the modifications given after the review by Justin Rye.

[Michael Lustfield]
* debian/conf/uwsgi_params:
  + Added UWSGI_SCHEME to uwsgi_params. (Closes: #664878)
* debian/conf/sites-available/default:
  + Added allow directive for ipv6 localhost. (Closes: #664271)

[Kartik Mistry]
* debian/control:
  + wrap-and-sort.
* debian/copyright:
  + Added missing copyrights, minor formatting fixes.
* debian/nginx-common.nginx.init:
  + Added ulimit for restarts, Thanks to Daniel Roschka
    <danielroschka@phoenitydawn.de> for patch. (Closes: #673580)
* debian/conf/sites-available/default:
  + Added patch to fix deprecated "listen" directive, Thanks to
    Guillaume Plessis <gui@dotdeb.org> for patch. (Closes: #672632)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef DDEBUG
1
2
#define DDEBUG 0
 
3
#endif
2
4
#include "ddebug.h"
3
5
 
4
6
#include "ngx_http_echo_filter.h"
98
100
    ngx_http_echo_ctx_t         *ctx;
99
101
    ngx_int_t                    rc;
100
102
    ngx_http_echo_loc_conf_t    *conf;
101
 
    ngx_flag_t                   last;
 
103
    unsigned                     last;
102
104
    ngx_chain_t                 *cl;
 
105
    ngx_chain_t                 *prev;
103
106
    ngx_buf_t                   *buf;
104
107
 
105
108
    if (in == NULL || r->header_only) {
133
136
 
134
137
    last = 0;
135
138
 
136
 
    for (cl = in; cl; cl = cl->next) {
 
139
    prev = NULL;
 
140
    for (cl = in; cl; prev = cl, cl = cl->next) {
 
141
        dd("prev %p, cl %p, special %d", prev, cl, ngx_buf_special(cl->buf));
 
142
 
137
143
        if (cl->buf->last_buf) {
138
 
            cl->buf->last_buf = 0;
139
 
            cl->buf->sync = 1;
 
144
            if (ngx_buf_special(cl->buf)) {
 
145
                if (prev) {
 
146
                    prev->next = NULL;
 
147
 
 
148
                } else {
 
149
                    in = NULL;
 
150
                }
 
151
 
 
152
            } else {
 
153
                cl->buf->last_buf = 0;
 
154
            }
 
155
 
140
156
            last = 1;
141
157
        }
142
158
    }
143
159
 
144
 
    rc = ngx_http_echo_next_body_filter(r, in);
145
 
 
146
 
    if (rc == NGX_ERROR || !last) {
147
 
        return rc;
 
160
    dd("in %p, last %d", in, (int) last);
 
161
 
 
162
    if (in) {
 
163
        rc = ngx_http_echo_next_body_filter(r, in);
 
164
 
 
165
#if 0
 
166
        if (rc == NGX_AGAIN) {
 
167
            return NGX_ERROR;
 
168
        }
 
169
#endif
 
170
 
 
171
        dd("next filter returns %d, last %d", (int) rc, (int) last);
 
172
 
 
173
        if (rc == NGX_ERROR || rc > NGX_OK || !last) {
 
174
            return rc;
 
175
        }
148
176
    }
149
177
 
150
178
    dd("exec filter cmds for after body cmds");
152
180
    rc = ngx_http_echo_exec_filter_cmds(r, ctx, conf->after_body_cmds,
153
181
            &ctx->next_after_body_cmd);
154
182
 
155
 
    if (rc == NGX_ERROR || rc >= NGX_HTTP_SPECIAL_RESPONSE) {
 
183
    if (rc == NGX_ERROR || rc > NGX_OK) {
156
184
        dd("FAILED: exec filter cmds for after body cmds");
157
185
        return rc;
158
186
    }
231
259
            rc = ngx_http_echo_exec_echo(r, ctx, computed_args,
232
260
                    1 /* in filter */, opts);
233
261
 
234
 
            if (rc != NGX_OK) {
 
262
            if (rc == NGX_ERROR || rc > NGX_OK) {
235
263
                return rc;
236
264
            }
237
265