Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1FBAE9F9D for ; Wed, 2 Nov 2011 08:44:55 +0000 (UTC) Received: (qmail 52549 invoked by uid 500); 2 Nov 2011 08:44:49 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 52479 invoked by uid 500); 2 Nov 2011 08:44:48 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 52471 invoked by uid 99); 2 Nov 2011 08:44:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Nov 2011 08:44:48 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [195.232.224.72] (HELO mailout03.vodafone.com) (195.232.224.72) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Nov 2011 08:44:39 +0000 Received: from mailint03 (localhost [127.0.0.1]) by mailout03 (Postfix) with ESMTP id 6519E1167FF for ; Wed, 2 Nov 2011 09:44:17 +0100 (CET) Received: from mbbpop-rat03.vodafone.com (mbbpop-rat03.vodafone.com [195.232.244.150]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mailint03 (Postfix) with ESMTPS id 58714116791 for ; Wed, 2 Nov 2011 09:44:17 +0100 (CET) Received: from [145.230.65.198] (unknown [145.230.65.198]) by mbbpop-rat03.vodafone.com (Postfix) with ESMTP id 4D2413CC068 for ; Wed, 2 Nov 2011 09:44:17 +0100 (CET) Message-ID: <4EB110F0.9090105@vodafone.com> Date: Wed, 02 Nov 2011 10:44:16 +0100 From: =?ISO-8859-1?Q?R=FCdiger_Pl=FCm?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.23) Gecko/20110920 SUSE/3.1.15 Thunderbird/3.1.15 MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: prefetch proxy References: <1B1ED6D5-E3B3-42D9-95EA-AD748CEF607B@jaguNET.com> In-Reply-To: <1B1ED6D5-E3B3-42D9-95EA-AD748CEF607B@jaguNET.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Am 01.11.2011 21:23, schrieb Jim Jagielski: > In mod_proxy_http we have: > > /* Prefetch MAX_MEM_SPOOL bytes > * > * This helps us avoid any election of C-L v.s. T-E > * request bodies, since we are willing to keep in > * memory this much data, in any case. This gives > * us an instant C-L election if the body is of some > * reasonable size. > */ > temp_brigade = apr_brigade_create(p, bucket_alloc); > do { > status = ap_get_brigade(r->input_filters, temp_brigade, > AP_MODE_READBYTES, APR_BLOCK_READ, > MAX_MEM_SPOOL - bytes_read); > if (status != APR_SUCCESS) { > ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server, > "proxy: prefetch request body failed to %pI (%s)" > " from %s (%s)", > p_conn->addr, p_conn->hostname ? p_conn->hostname: "", > c->remote_ip, c->remote_host ? c->remote_host: ""); > return HTTP_BAD_REQUEST; > } > > apr_brigade_length(temp_brigade, 1,&bytes); > bytes_read += bytes; > > However, I see times when status could be APR_EAGAIN. IMO, it doesn't > make sense to error out here in that case. Right? Why should it be EAGAIN with a blocking read? Regards R�diger