View | Details | Raw Unified | Return to bug 62568
Collapse All | Expand All

(-)modules/filters/mod_ratelimit.c (-1 / +1 lines)
Lines 327-333 static void register_hooks(apr_pool_t *p) Link Here
327
{
327
{
328
    /* run after mod_deflate etc etc, but not at connection level, ie, mod_ssl. */
328
    /* run after mod_deflate etc etc, but not at connection level, ie, mod_ssl. */
329
    ap_register_output_filter(RATE_LIMIT_FILTER_NAME, rate_limit_filter,
329
    ap_register_output_filter(RATE_LIMIT_FILTER_NAME, rate_limit_filter,
330
                              NULL, AP_FTYPE_PROTOCOL + 3);
330
                              NULL, AP_FTYPE_CONNECTION - 1);
331
}
331
}
332
332
333
AP_DECLARE_MODULE(ratelimit) = {
333
AP_DECLARE_MODULE(ratelimit) = {
(-)modules/http/http_filters.c (-1 / +12 lines)
Lines 1308-1315 AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_heade Link Here
1308
    else if (ctx->headers_sent) {
1308
    else if (ctx->headers_sent) {
1309
        /* Eat body if response must not have one. */
1309
        /* Eat body if response must not have one. */
1310
        if (r->header_only || r->status == HTTP_NO_CONTENT) {
1310
        if (r->header_only || r->status == HTTP_NO_CONTENT) {
1311
            /* Still next filters may be waiting for EOS, so pass it (alone)
1312
             * when encountered and be done with this filter.
1313
             */
1314
            e = APR_BRIGADE_LAST(b);
1315
            if (e != APR_BRIGADE_SENTINEL(b) && APR_BUCKET_IS_EOS(e)) {
1316
                APR_BUCKET_REMOVE(e);
1317
                apr_brigade_cleanup(b);
1318
                APR_BRIGADE_INSERT_HEAD(b, e);
1319
                ap_remove_output_filter(f);
1320
                rv = ap_pass_brigade(f->next, b);
1321
            }
1311
            apr_brigade_cleanup(b);
1322
            apr_brigade_cleanup(b);
1312
            return APR_SUCCESS;
1323
            return rv;
1313
        }
1324
        }
1314
    }
1325
    }
1315
1326

Return to bug 62568