You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@apache.org on 2018/01/10 00:52:25 UTC
svn commit: r1820715 - in /httpd/httpd/trunk: CHANGES
modules/metadata/mod_headers.c
Author: covener
Date: Wed Jan 10 00:52:25 2018
New Revision: 1820715
URL: http://svn.apache.org/viewvc?rev=1820715&view=rev
Log:
PR 61983: "Header unset Content-Type" doesn't work
Submitted By: Hank Ibell <hwibell gmail.com>
Committed By: covener
Modified:
httpd/httpd/trunk/CHANGES
httpd/httpd/trunk/modules/metadata/mod_headers.c
Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1820715&r1=1820714&r2=1820715&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Wed Jan 10 00:52:25 2018
@@ -1,6 +1,8 @@
-*- coding: utf-8 -*-
Changes with Apache 2.5.1
+ *) mod_headers: Allow 'Header unset Content-Type' to remove the Content-Type
+ header. PR 61983. [Hank Ibell <hwibell gmail.com>]
*) mod_md v1.1.8: new configuration directive "MDBaseServer on|off" to allow/inhibit
management of the base server domains outside VirtualHosts. By default, this is "off",
Modified: httpd/httpd/trunk/modules/metadata/mod_headers.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/metadata/mod_headers.c?rev=1820715&r1=1820714&r2=1820715&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/metadata/mod_headers.c (original)
+++ httpd/httpd/trunk/modules/metadata/mod_headers.c Wed Jan 10 00:52:25 2018
@@ -806,6 +806,9 @@ static int do_headers_fixup(request_rec
break;
case hdr_unset:
apr_table_unset(headers, hdr->header);
+ if (!ap_cstr_casecmp(hdr->header, "Content-Type")) {
+ ap_set_content_type(r, NULL);
+ }
break;
case hdr_echo:
v.r = r;
Re: svn commit: r1820715 - in /httpd/httpd/trunk: CHANGES modules/metadata/mod_headers.c
Posted by Yann Ylavic <yl...@gmail.com>.
On Wed, Jan 10, 2018 at 2:48 PM, Eric Covener <co...@gmail.com> wrote:
> On Wed, Jan 10, 2018 at 8:27 AM, Eric Covener <co...@gmail.com> wrote:
>> On Wed, Jan 10, 2018 at 7:13 AM, Yann Ylavic <yl...@gmail.com> wrote:
>>> On Wed, Jan 10, 2018 at 1:52 AM, <co...@apache.org> wrote:
>>>> Author: covener
>>>> Date: Wed Jan 10 00:52:25 2018
>>>> New Revision: 1820715
>>>>
>>>> URL: http://svn.apache.org/viewvc?rev=1820715&view=rev
>>>> Log:
>>>> PR 61983: "Header unset Content-Type" doesn't work
>>>>
>>>>
>>>> Submitted By: Hank Ibell <hwibell gmail.com>
>>>> Committed By: covener
>>> []
>>>>
>>>> Modified: httpd/httpd/trunk/modules/metadata/mod_headers.c
>>>> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/metadata/mod_headers.c?rev=1820715&r1=1820714&r2=1820715&view=diff
>>>> ==============================================================================
>>>> --- httpd/httpd/trunk/modules/metadata/mod_headers.c (original)
>>>> +++ httpd/httpd/trunk/modules/metadata/mod_headers.c Wed Jan 10 00:52:25 2018
>>>> @@ -806,6 +806,9 @@ static int do_headers_fixup(request_rec
>>>> break;
>>>> case hdr_unset:
>>>> apr_table_unset(headers, hdr->header);
>>>> + if (!ap_cstr_casecmp(hdr->header, "Content-Type")) {
>>>> + ap_set_content_type(r, NULL);
>>>> + }
>>>
>>> Don't we need to also check for "headers != r->headers_in &&
>>> !ap_cstr_casecmp(...)" here?
>>
>> I see what you mean, this would be in fixups (after type checker) and
>> we could clobber the outbound side. Thanks.
>
> Hoping I followed in 1820750, thanks again!
Looks good, I didn't figure out we were doing this at several places.
Thanks Eric.
Re: svn commit: r1820715 - in /httpd/httpd/trunk: CHANGES modules/metadata/mod_headers.c
Posted by Eric Covener <co...@gmail.com>.
On Wed, Jan 10, 2018 at 8:27 AM, Eric Covener <co...@gmail.com> wrote:
> On Wed, Jan 10, 2018 at 7:13 AM, Yann Ylavic <yl...@gmail.com> wrote:
>> On Wed, Jan 10, 2018 at 1:52 AM, <co...@apache.org> wrote:
>>> Author: covener
>>> Date: Wed Jan 10 00:52:25 2018
>>> New Revision: 1820715
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1820715&view=rev
>>> Log:
>>> PR 61983: "Header unset Content-Type" doesn't work
>>>
>>>
>>> Submitted By: Hank Ibell <hwibell gmail.com>
>>> Committed By: covener
>> []
>>>
>>> Modified: httpd/httpd/trunk/modules/metadata/mod_headers.c
>>> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/metadata/mod_headers.c?rev=1820715&r1=1820714&r2=1820715&view=diff
>>> ==============================================================================
>>> --- httpd/httpd/trunk/modules/metadata/mod_headers.c (original)
>>> +++ httpd/httpd/trunk/modules/metadata/mod_headers.c Wed Jan 10 00:52:25 2018
>>> @@ -806,6 +806,9 @@ static int do_headers_fixup(request_rec
>>> break;
>>> case hdr_unset:
>>> apr_table_unset(headers, hdr->header);
>>> + if (!ap_cstr_casecmp(hdr->header, "Content-Type")) {
>>> + ap_set_content_type(r, NULL);
>>> + }
>>
>> Don't we need to also check for "headers != r->headers_in &&
>> !ap_cstr_casecmp(...)" here?
>
> I see what you mean, this would be in fixups (after type checker) and
> we could clobber the outbound side. Thanks.
Hoping I followed in 1820750, thanks again!
Re: svn commit: r1820715 - in /httpd/httpd/trunk: CHANGES modules/metadata/mod_headers.c
Posted by Eric Covener <co...@gmail.com>.
On Wed, Jan 10, 2018 at 7:13 AM, Yann Ylavic <yl...@gmail.com> wrote:
> On Wed, Jan 10, 2018 at 1:52 AM, <co...@apache.org> wrote:
>> Author: covener
>> Date: Wed Jan 10 00:52:25 2018
>> New Revision: 1820715
>>
>> URL: http://svn.apache.org/viewvc?rev=1820715&view=rev
>> Log:
>> PR 61983: "Header unset Content-Type" doesn't work
>>
>>
>> Submitted By: Hank Ibell <hwibell gmail.com>
>> Committed By: covener
> []
>>
>> Modified: httpd/httpd/trunk/modules/metadata/mod_headers.c
>> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/metadata/mod_headers.c?rev=1820715&r1=1820714&r2=1820715&view=diff
>> ==============================================================================
>> --- httpd/httpd/trunk/modules/metadata/mod_headers.c (original)
>> +++ httpd/httpd/trunk/modules/metadata/mod_headers.c Wed Jan 10 00:52:25 2018
>> @@ -806,6 +806,9 @@ static int do_headers_fixup(request_rec
>> break;
>> case hdr_unset:
>> apr_table_unset(headers, hdr->header);
>> + if (!ap_cstr_casecmp(hdr->header, "Content-Type")) {
>> + ap_set_content_type(r, NULL);
>> + }
>
> Don't we need to also check for "headers != r->headers_in &&
> !ap_cstr_casecmp(...)" here?
I see what you mean, this would be in fixups (after type checker) and
we could clobber the outbound side. Thanks.
Re: svn commit: r1820715 - in /httpd/httpd/trunk: CHANGES modules/metadata/mod_headers.c
Posted by Yann Ylavic <yl...@gmail.com>.
On Wed, Jan 10, 2018 at 1:52 AM, <co...@apache.org> wrote:
> Author: covener
> Date: Wed Jan 10 00:52:25 2018
> New Revision: 1820715
>
> URL: http://svn.apache.org/viewvc?rev=1820715&view=rev
> Log:
> PR 61983: "Header unset Content-Type" doesn't work
>
>
> Submitted By: Hank Ibell <hwibell gmail.com>
> Committed By: covener
[]
>
> Modified: httpd/httpd/trunk/modules/metadata/mod_headers.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/metadata/mod_headers.c?rev=1820715&r1=1820714&r2=1820715&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/metadata/mod_headers.c (original)
> +++ httpd/httpd/trunk/modules/metadata/mod_headers.c Wed Jan 10 00:52:25 2018
> @@ -806,6 +806,9 @@ static int do_headers_fixup(request_rec
> break;
> case hdr_unset:
> apr_table_unset(headers, hdr->header);
> + if (!ap_cstr_casecmp(hdr->header, "Content-Type")) {
> + ap_set_content_type(r, NULL);
> + }
Don't we need to also check for "headers != r->headers_in &&
!ap_cstr_casecmp(...)" here?
> break;
> case hdr_echo:
> v.r = r;