static void deflate_compress_cleanup(server *srv, connection *con, handler_ctx *hctx) { const plugin_data *p = hctx->plugin_data; con->plugin_ctx[p->id] = NULL; if (0 != mod_deflate_stream_end(srv, hctx)) { log_error_write(srv, __FILE__, __LINE__, "s", "error closing stream"); } #if 1 /* unnecessary if deflate.min-compress-size is set to a reasonable value */ if (hctx->bytes_in < hctx->bytes_out) { log_error_write(srv, __FILE__, __LINE__, "sbsdsd", "uri ", con->uri.path_raw, " in=", hctx->bytes_in, " smaller than out=", hctx->bytes_out); } #endif handler_ctx_free(hctx); }
void proxy_connection_close(server *srv, handler_ctx *hctx) { plugin_data *p; connection *con; if (NULL == hctx) return; p = hctx->plugin_data; con = hctx->remote_conn; if (hctx->fd != -1) { fdevent_event_del(srv->ev, &(hctx->fde_ndx), hctx->fd); fdevent_unregister(srv->ev, hctx->fd); close(hctx->fd); srv->cur_fds--; } handler_ctx_free(hctx); con->plugin_ctx[p->id] = NULL; }