Return-Path:
Delivered-To: apmail-httpd-dev-archive@www.apache.org
Received: (qmail 44128 invoked from network); 11 Sep 2009 22:10:11 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3)
by minotaur.apache.org with SMTP; 11 Sep 2009 22:10:11 -0000
Received: (qmail 77005 invoked by uid 500); 11 Sep 2009 22:10:10 -0000
Delivered-To: apmail-httpd-dev-archive@httpd.apache.org
Received: (qmail 76924 invoked by uid 500); 11 Sep 2009 22:10:10 -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 76915 invoked by uid 99); 11 Sep 2009 22:10:10 -0000
Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136)
by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Sep 2009 22:10:10 +0000
X-ASF-Spam-Status: No, hits=1.2 required=10.0
tests=SPF_NEUTRAL
X-Spam-Check-By: apache.org
Received-SPF: neutral (athena.apache.org: local policy)
Received: from [64.202.165.95] (HELO smtpauth04.prod.mesa1.secureserver.net)
(64.202.165.95)
by apache.org (qpsmtpd/0.29) with SMTP; Fri, 11 Sep 2009 22:10:01 +0000
Received: (qmail 30104 invoked from network); 11 Sep 2009 22:09:39 -0000
Received: from unknown (76.252.112.72)
by smtpauth04.prod.mesa1.secureserver.net (64.202.165.95) with ESMTP;
11 Sep 2009 22:09:38 -0000
Message-ID: <4AAACA98.2080804@rowe-clan.net>
Date: Fri, 11 Sep 2009 17:09:28 -0500
From: "William A. Rowe, Jr."
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
To: dev@httpd.apache.org
Subject: Re: svn commit: r814048 -
/httpd/httpd/trunk/modules/http/http_protocol.c
References: <20090911215553.574A823888D7@eris.apache.org>
<4AAAC9D2.8050804@apache.org>
In-Reply-To: <4AAAC9D2.8050804@apache.org>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Virus-Checked: Checked by ClamAV on apache.org
Ruediger Pluem wrote:
>
> On 09/11/2009 11:55 PM, wrowe@apache.org wrote:
>> Author: wrowe
>> Date: Fri Sep 11 21:55:46 2009
>> New Revision: 814048
>>
>> URL: http://svn.apache.org/viewvc?rev=814048&view=rev
>> Log:
>> Catch the somewhat absurd combination of a 417 error where no Expect header
>> was present.
>>
>> Modified:
>> httpd/httpd/trunk/modules/http/http_protocol.c
>>
>> Modified: httpd/httpd/trunk/modules/http/http_protocol.c
>> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/http_protocol.c?rev=814048&r1=814047&r2=814048&view=diff
>> ==============================================================================
>> --- httpd/httpd/trunk/modules/http/http_protocol.c (original)
>> +++ httpd/httpd/trunk/modules/http/http_protocol.c Fri Sep 11 21:55:46 2009
>> @@ -1011,16 +1011,19 @@
>> "request-header field overlap the current extent\n"
>> "of the selected resource.
\n");
>> case HTTP_EXPECTATION_FAILED:
>> - return(apr_pstrcat(p,
>> - "The expectation given in the Expect "
>> - "request-header"
>> - "\nfield could not be met by this server.
\n"
>> - "The client sent
\n Expect: ",
>> - ap_escape_html(r->pool, apr_table_get(r->headers_in, "Expect")),
>> - "\n
\n"
>> - "but we only allow the 100-continue "
>> - "expectation.\n",
>> - NULL));
>> + s1 = apr_table_get(r->headers_in, "Expect");
>> + if (s1)
>> + s1 = apr_pstrcat(p,
>> + "The expectation given in the Expect request-header\n"
>> + "field could not be met by this server.\n"
>> + "The client sent
\n Expect: ",
>> + ap_escape_html(r->pool, s1), "\n
\n"
>> + NULL);
>> + else
>> + s1 = "No expectation was seen, the Expect request-header \n"
>> + "field was not presented by the client.\n";
>> + return add_optional_notes(r, s1, "error-notes", "
"
>> + "Only the 100-continue expectation is supported.
\n");
>
> Hm. Does it make sense to squeeze in the contents of the error-notes between s1
> and "Only the 100-continue expectation is supported.
\n"?
> Why not just return apr_pstrcat(p, s1, "Only the 100-continue expectation is supported.
\n", NULL)?
Tag Balance. Note that the ... is one string.