You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Michael Osipov <mi...@apache.org> on 2018/07/04 19:25:51 UTC

mod_proxy_http and "Expect: 100-continue" don't play well

Hi folks,

has anymore ever used Tomcat behind mod_proxy_http where a client does a 
PUT/POST with "Expect: 100-continue"?

I recently started using Tomat 8.5.31 behind HTTPd 2.4.33 and 
immediately hit BZ 60330/55433. HTTPd responds with HTTP/1.1 100 instead 
of receiving this from Tomcat. The outcome is that the client uploads 
its data twice because Tomcat challenges the client to authenticate 
whereas HTTPd does not of course. I know that Tomcat does everything 
correctly because a direct connection works as expected.

Is there any remedy to this? I will try mod_proxy_ajp tomorrow. If no 
solution is available, this will basically mean that I have to drop 
HTTPd proxying the requests and lose potential balancing features in the 
future for this service.

Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: RE: mod_proxy_http and "Expect: 100-continue" don't play well

Posted by Michael Osipov <19...@gmx.net>.
Just did the test. Zero changed, broken as before.

Anyway, thanks for helping. I will try to continue with Yann on the Bugzilla issue.

Michael

>
> Dear Michael,
> 
> did you give it a try, also? To my knowledge the keyword "early" may hide this header from the Apache machinery to act on it. As you said this header is need to set for the backend, maybe it's possible to add it again with a normal ("late") "RequestHeader set". Maybe it's possible to early edit it "disfunctional" and to restore it later matched on this.
> 
> greetings
> 
> Guido
> 
> https://httpd.apache.org/docs/2.4/mod/mod_headers.html 
> ["Early mode is designed as a test/debugging aid for developers. Directives defined using the early keyword are set right at the beginning of processing the request. This means they can be used to simulate different requests and set up test cases, but it also means that headers may be changed at any time by other modules before generating a Response.
> Because early directives are processed before the request path's configuration is traversed, early headers can only be set in a main server or virtual host context. Early directives cannot depend on a request path, so they will fail in contexts such as <Directory> or <Location>.
> 
> [...]
> 
> Except in early mode, the RequestHeader directive is processed just before the request is run by its handler in the fixup phase. This should allow headers generated by the browser, or by Apache input filters to be overridden or modified.
> 
> "]
> 
> >-----Original Message-----
> >From: Michael Osipov [mailto:michaelo@apache.org]
> >Sent: Thursday, July 05, 2018 8:07 PM
> >To: Tomcat Users List <us...@tomcat.apache.org>
> >Subject: Re: mod_proxy_http and "Expect: 100-continue" don't play well
> >
> >Am 2018-07-05 um 14:44 schrieb Jäkel, Guido:
> >> Dear Michael,
> >>
> >> I wasn't faced by this yes, but what's about adding something like
> >>
> >> 	<IfModule mod_headers.c>
> >> 	    RequestHeader unset Expect early
> >> 	</IfModule>
> >>
> >> at the Apache httpd?
> >
> >I know that tip, but it makes no sense at all. The client expected
> >100-continue, but you are dropping this request header. You effective
> >disabling this feature.
> >
> >>> -----Original Message-----
> >>> From: Michael Osipov [mailto:1983-01-06@gmx.net]
> >>> Sent: Thursday, July 05, 2018 2:03 PM
> >>> To: users@tomcat.apache.org
> >>> Subject: Re: RE: mod_proxy_http and "Expect: 100-continue" don't play well
> >>>
> >>>
> >>>> Dear Michael,
> >>>>
> >>>> i don't know if this issue also take happen with it, but may be using  mod_jk  an option for you, also?
> >>>
> >>> Hi Guido,
> >>>
> >>> just installed mod_jk through ports and configured it. No avail, I have the very same issue.
> >>> I will raise this on the HTTPd mailing list.
> >>>
> >>> Michael
> >>>
> >>>
> >>>>> -----Original Message-----
> >>>>> From: Michael Osipov [mailto:michaelo@apache.org]
> >>>>> Sent: Wednesday, July 04, 2018 9:26 PM
> >>>>> To: users@tomcat.apache.org
> >>>>> Subject: mod_proxy_http and "Expect: 100-continue" don't play well
> >>>>>
> >>>>> Hi folks,
> >>>>>
> >>>>> [...]
> >>>>>
> >>>>> Is there any remedy to this? I will try mod_proxy_ajp tomorrow. If no
> >>>>> solution is available, this will basically mean that I have to drop
> >>>>> HTTPd proxying the requests and lose potential balancing features in the
> >>>>> future for this service.
> >>>>>
> >>>>> Michael
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >>>> For additional commands, e-mail: users-help@tomcat.apache.org
> >>>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >>> For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: mod_proxy_http and "Expect: 100-continue" don't play well

Posted by Jäkel, Guido <G....@dnb.de>.
Dear Michael,

did you give it a try, also? To my knowledge the keyword "early" may hide this header from the Apache machinery to act on it. As you said this header is need to set for the backend, maybe it's possible to add it again with a normal ("late") "RequestHeader set". Maybe it's possible to early edit it "disfunctional" and to restore it later matched on this.

greetings

Guido

https://httpd.apache.org/docs/2.4/mod/mod_headers.html 
["Early mode is designed as a test/debugging aid for developers. Directives defined using the early keyword are set right at the beginning of processing the request. This means they can be used to simulate different requests and set up test cases, but it also means that headers may be changed at any time by other modules before generating a Response.
Because early directives are processed before the request path's configuration is traversed, early headers can only be set in a main server or virtual host context. Early directives cannot depend on a request path, so they will fail in contexts such as <Directory> or <Location>.

[...]

Except in early mode, the RequestHeader directive is processed just before the request is run by its handler in the fixup phase. This should allow headers generated by the browser, or by Apache input filters to be overridden or modified.

"]

>-----Original Message-----
>From: Michael Osipov [mailto:michaelo@apache.org]
>Sent: Thursday, July 05, 2018 8:07 PM
>To: Tomcat Users List <us...@tomcat.apache.org>
>Subject: Re: mod_proxy_http and "Expect: 100-continue" don't play well
>
>Am 2018-07-05 um 14:44 schrieb Jäkel, Guido:
>> Dear Michael,
>>
>> I wasn't faced by this yes, but what's about adding something like
>>
>> 	<IfModule mod_headers.c>
>> 	    RequestHeader unset Expect early
>> 	</IfModule>
>>
>> at the Apache httpd?
>
>I know that tip, but it makes no sense at all. The client expected
>100-continue, but you are dropping this request header. You effective
>disabling this feature.
>
>>> -----Original Message-----
>>> From: Michael Osipov [mailto:1983-01-06@gmx.net]
>>> Sent: Thursday, July 05, 2018 2:03 PM
>>> To: users@tomcat.apache.org
>>> Subject: Re: RE: mod_proxy_http and "Expect: 100-continue" don't play well
>>>
>>>
>>>> Dear Michael,
>>>>
>>>> i don't know if this issue also take happen with it, but may be using  mod_jk  an option for you, also?
>>>
>>> Hi Guido,
>>>
>>> just installed mod_jk through ports and configured it. No avail, I have the very same issue.
>>> I will raise this on the HTTPd mailing list.
>>>
>>> Michael
>>>
>>>
>>>>> -----Original Message-----
>>>>> From: Michael Osipov [mailto:michaelo@apache.org]
>>>>> Sent: Wednesday, July 04, 2018 9:26 PM
>>>>> To: users@tomcat.apache.org
>>>>> Subject: mod_proxy_http and "Expect: 100-continue" don't play well
>>>>>
>>>>> Hi folks,
>>>>>
>>>>> [...]
>>>>>
>>>>> Is there any remedy to this? I will try mod_proxy_ajp tomorrow. If no
>>>>> solution is available, this will basically mean that I have to drop
>>>>> HTTPd proxying the requests and lose potential balancing features in the
>>>>> future for this service.
>>>>>
>>>>> Michael
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: mod_proxy_http and "Expect: 100-continue" don't play well

Posted by Michael Osipov <mi...@apache.org>.
Am 2018-07-05 um 14:44 schrieb Jäkel, Guido:
> Dear Michael,
> 
> I wasn't faced by this yes, but what's about adding something like
> 
> 	<IfModule mod_headers.c>
> 	    RequestHeader unset Expect early
> 	</IfModule>
> 
> at the Apache httpd?

I know that tip, but it makes no sense at all. The client expected 
100-continue, but you are dropping this request header. You effective 
disabling this feature.

>> -----Original Message-----
>> From: Michael Osipov [mailto:1983-01-06@gmx.net]
>> Sent: Thursday, July 05, 2018 2:03 PM
>> To: users@tomcat.apache.org
>> Subject: Re: RE: mod_proxy_http and "Expect: 100-continue" don't play well
>>
>>
>>> Dear Michael,
>>>
>>> i don't know if this issue also take happen with it, but may be using  mod_jk  an option for you, also?
>>
>> Hi Guido,
>>
>> just installed mod_jk through ports and configured it. No avail, I have the very same issue.
>> I will raise this on the HTTPd mailing list.
>>
>> Michael
>>
>>
>>>> -----Original Message-----
>>>> From: Michael Osipov [mailto:michaelo@apache.org]
>>>> Sent: Wednesday, July 04, 2018 9:26 PM
>>>> To: users@tomcat.apache.org
>>>> Subject: mod_proxy_http and "Expect: 100-continue" don't play well
>>>>
>>>> Hi folks,
>>>>
>>>> [...]
>>>>
>>>> Is there any remedy to this? I will try mod_proxy_ajp tomorrow. If no
>>>> solution is available, this will basically mean that I have to drop
>>>> HTTPd proxying the requests and lose potential balancing features in the
>>>> future for this service.
>>>>
>>>> Michael
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: RE: mod_proxy_http and "Expect: 100-continue" don't play well

Posted by Jäkel, Guido <G....@dnb.de>.
Dear Michael,

I wasn't faced by this yes, but what's about adding something like

	<IfModule mod_headers.c>
	    RequestHeader unset Expect early
	</IfModule>

at the Apache httpd?

Greetings

Guido

>-----Original Message-----
>From: Michael Osipov [mailto:1983-01-06@gmx.net]
>Sent: Thursday, July 05, 2018 2:03 PM
>To: users@tomcat.apache.org
>Subject: Re: RE: mod_proxy_http and "Expect: 100-continue" don't play well
>
>
>> Dear Michael,
>>
>> i don't know if this issue also take happen with it, but may be using  mod_jk  an option for you, also?
>
>Hi Guido,
>
>just installed mod_jk through ports and configured it. No avail, I have the very same issue.
>I will raise this on the HTTPd mailing list.
>
>Michael
>
>
>> >-----Original Message-----
>> >From: Michael Osipov [mailto:michaelo@apache.org]
>> >Sent: Wednesday, July 04, 2018 9:26 PM
>> >To: users@tomcat.apache.org
>> >Subject: mod_proxy_http and "Expect: 100-continue" don't play well
>> >
>> >Hi folks,
>> >
>> >[...]
>> >
>> >Is there any remedy to this? I will try mod_proxy_ajp tomorrow. If no
>> >solution is available, this will basically mean that I have to drop
>> >HTTPd proxying the requests and lose potential balancing features in the
>> >future for this service.
>> >
>> >Michael
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org


Re: RE: mod_proxy_http and "Expect: 100-continue" don't play well

Posted by Michael Osipov <19...@gmx.net>.
> Dear Michael,
> 
> i don't know if this issue also take happen with it, but may be using  mod_jk  an option for you, also?

Hi Guido,

just installed mod_jk through ports and configured it. No avail, I have the very same issue.
I will raise this on the HTTPd mailing list.

Michael


> >-----Original Message-----
> >From: Michael Osipov [mailto:michaelo@apache.org]
> >Sent: Wednesday, July 04, 2018 9:26 PM
> >To: users@tomcat.apache.org
> >Subject: mod_proxy_http and "Expect: 100-continue" don't play well
> >
> >Hi folks,
> >
> >[...]
> >
> >Is there any remedy to this? I will try mod_proxy_ajp tomorrow. If no
> >solution is available, this will basically mean that I have to drop
> >HTTPd proxying the requests and lose potential balancing features in the
> >future for this service.
> >
> >Michael
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: mod_proxy_http and "Expect: 100-continue" don't play well

Posted by Jäkel, Guido <G....@dnb.de>.
Dear Michael,

i don't know if this issue also take happen with it, but may be using  mod_jk  an option for you, also?

Greetings

Guido

>-----Original Message-----
>From: Michael Osipov [mailto:michaelo@apache.org]
>Sent: Wednesday, July 04, 2018 9:26 PM
>To: users@tomcat.apache.org
>Subject: mod_proxy_http and "Expect: 100-continue" don't play well
>
>Hi folks,
>
>[...]
>
>Is there any remedy to this? I will try mod_proxy_ajp tomorrow. If no
>solution is available, this will basically mean that I have to drop
>HTTPd proxying the requests and lose potential balancing features in the
>future for this service.
>
>Michael