~matttbe/ubuntu/quantal/apache2/lp1013171

« back to all changes in this revision

Viewing changes to modules/proxy/mod_proxy_ajp.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-07-26 20:21:37 UTC
  • mfrom: (14.3.17 sid)
  • Revision ID: james.westby@ubuntu.com-20100726202137-rctltspkiazb40z1
Tags: 2.2.16-1ubuntu1
* Merge from debian unstable.  Remaining changes:
  - debian/{control, rules}: Enable PIE hardening.
  - debian/{control, rules, apache2.2-common.ufw.profile}: Add ufw profiles.
  - debian/control: Add bzr tag and point it to our tree.
  - debian/apache2-2.common.apache2.init: Add graceful restart (LP: #456381)

Show diffs side-by-side

added added

removed removed

Lines of Context:
450
450
                        }
451
451
                    }
452
452
                    else {
 
453
                        apr_status_t rv;
 
454
 
453
455
                        e = apr_bucket_transient_create(send_body_chunk_buff, size,
454
456
                                                    r->connection->bucket_alloc);
455
457
                        APR_BRIGADE_INSERT_TAIL(output_brigade, e);
456
458
 
457
459
                        if ((conn->worker->flush_packets == flush_on) ||
458
460
                            ((conn->worker->flush_packets == flush_auto) &&
459
 
                            (apr_poll(conn_poll, 1, &conn_poll_fd,
460
 
                                      conn->worker->flush_wait)
461
 
                                        == APR_TIMEUP) ) ) {
 
461
                            ((rv = apr_poll(conn_poll, 1, &conn_poll_fd,
 
462
                                             conn->worker->flush_wait))
 
463
                                             != APR_SUCCESS) &&
 
464
                              APR_STATUS_IS_TIMEUP(rv))) {
462
465
                            e = apr_bucket_flush_create(r->connection->bucket_alloc);
463
466
                            APR_BRIGADE_INSERT_TAIL(output_brigade, e);
464
467
                        }
580
583
         */
581
584
        if (data_sent) {
582
585
            ap_proxy_backend_broke(r, output_brigade);
583
 
        } else
 
586
        } else if (!send_body && (is_idempotent(r) == METHOD_IDEMPOTENT)) {
 
587
            /*
 
588
             * This is only non fatal when we have not sent (parts) of a possible
 
589
             * request body so far (we do not store it and thus cannot sent it
 
590
             * again) and the method is idempotent. In this case we can dare to
 
591
             * retry it with a different worker if we are a balancer member.
 
592
             */
584
593
            rv = HTTP_SERVICE_UNAVAILABLE;
 
594
        } else {
 
595
            rv = HTTP_INTERNAL_SERVER_ERROR;
 
596
        }
585
597
    }
586
598
 
587
599
    /*