~ubuntu-branches/ubuntu/saucy/nginx/saucy-updates

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Kartik Mistry, Kartik Mistry
  • Date: 2011-09-26 10:17:04 UTC
  • mfrom: (4.2.38 sid)
  • Revision ID: package-import@ubuntu.com-20110926101704-x8pxngiujrmkxnn3
Tags: 1.1.4-2
[Kartik Mistry]
* debian/modules:
  + Updated nginx-upload-progress module, Thanks to upstream for fixing issue
    that FTBFS nginx on kFreeBSD-* archs.
  + Updated nginx-lua module to latest upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
        return;
51
51
    }
52
52
 
 
53
    dd("waiting: %d, done: %d", (int) ctx->waiting, (int) ctx->done);
 
54
 
53
55
    if (ctx->waiting && ! ctx->done) {
54
56
        if (r == r->connection->data && r->postponed) {
55
57
            if (r->postponed->request) {
214
216
 
215
217
        /* do command dispatch based on the opcode */
216
218
        switch (cmd->opcode) {
 
219
        case echo_opcode_echo_sync:
 
220
            rc = ngx_http_echo_exec_echo_sync(r, ctx);
 
221
            break;
 
222
 
217
223
        case echo_opcode_echo:
218
224
            /* XXX moved the following code to a separate
219
225
             * function */
333
339
    ngx_http_request_t          *pr;
334
340
    ngx_http_echo_ctx_t         *pr_ctx;
335
341
 
336
 
    dd_enter();
 
342
    dd("echo post_subrequest: %.*s", (int) r->uri.len, r->uri.data);
337
343
 
338
 
#if 0
339
344
    if (ctx->run_post_subrequest) {
 
345
        dd("already run post_subrequest: %p: %.*s", ctx,
 
346
                (int) r->uri.len, r->uri.data);
 
347
 
340
348
        return rc;
341
349
    }
342
 
#endif
 
350
 
 
351
    dd("setting run_post_subrequest to 1 for %p for %.*s", ctx,
 
352
            (int) r->uri.len, r->uri.data);
343
353
 
344
354
    ctx->run_post_subrequest = 1;
345
355
 
357
367
 
358
368
    pr->write_event_handler = ngx_http_echo_wev_handler;
359
369
 
360
 
    /* ensure that the parent request is (or will be)
361
 
     *  posted out the head of the r->posted_requests chain */
 
370
    /* work-around issues in nginx's event module */
362
371
 
363
 
    if (r->main->posted_requests
364
 
            && r->main->posted_requests->request != pr)
 
372
    if (r != r->connection->data && r->postponed &&
 
373
            (r->main->posted_requests == NULL ||
 
374
            r->main->posted_requests->request != pr))
365
375
    {
366
 
        rc = ngx_http_echo_post_request_at_head(pr, NULL);
367
 
        if (rc != NGX_OK) {
368
 
            return NGX_ERROR;
369
 
        }
 
376
#if defined(nginx_version) && nginx_version >= 8012
 
377
        ngx_http_post_request(pr, NULL);
 
378
#else
 
379
        ngx_http_post_request(pr);
 
380
#endif
370
381
    }
371
382
 
372
383
    return rc;