Title: Apache error: HTTP/1.1 request without hostname Post by: Michael Adam on July 13, 2010, 07:10:23 PM Hello Danijel,
today I stumbled across a problem regarding blocking calls from RTC clients to a RTC server via Apache. The configuration is as follows: Apache, configured as a proxy, listening on port 80, forwarding all request for the URL /test (sent by remote RTC clients as blocking calls) to a local RTC server (with TRtcHttpServer listening on port 1000 + some TRtcFunction instances). At first Apache refused to forward the request and instead wrote the following logs Apache access.log: 127.0.0.1 - - [13/Jul/2010:10:28:27 +0200] "POST /test?ID=NEW HTTP/1.1" 400 226 Apache error.log: [Tue Jul 13 10:28:27 2010] [error] [client 127.0.0.1] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /test but thanks to it's explicit error message I was able to solve this problem easily by implementing the TRtcClientModule.OnBeginRequest event and providing the host name. But after enabling encryption on the client side the same error returned, i. e. Apache is missing the host name again. Do you have an idea what may be causing this problem and do you have a solution or a workaround for it? Title: Re: Apache error: HTTP/1.1 request without hostname Post by: D.Tkalcec (RTC) on July 13, 2010, 08:14:48 PM What you are looking for is the "ModuleHost" property on the TRtcClientModule component. In other words, instead of implementing the TRtcClientModule.OnBeginRequst event to manually set the Host name, place the host name into the "TRtcClientModule.ModuleHost" property and the problem with Apache should go away.
Btw ... when you enable RTC encryption, TRtcClientModule component will be injecting requests to implement the encryption protocol. Since these automatically generated and injected requests should NOT be modified, there are no events which would allow you to intercept then. This is why implementing the OnBeginRequest worked without encryption but did not work after you've enabled RTC encryption. Best Regards, Danijel Tkalcec Title: Re: Apache error: HTTP/1.1 request without hostname Post by: Michael Adam on July 13, 2010, 10:10:19 PM Thanks Danijel,
setting the ModuleHost property works perfectly! Kind regards Michael |