RTC Forums
November 25, 2024, 12:47:41 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Login
Register
RTC Forums
>
Subscription
>
Support
>
Apache error: HTTP/1.1 request without hostname
Pages: [
1
]
« previous
next »
Print
Author
Topic: Apache error: HTTP/1.1 request without hostname (Read 5679 times)
Michael Adam
Newbie
Posts: 3
Apache error: HTTP/1.1 request without hostname
«
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?
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: Apache error: HTTP/1.1 request without hostname
«
Reply #1 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
Logged
Michael Adam
Newbie
Posts: 3
Re: Apache error: HTTP/1.1 request without hostname
«
Reply #2 on:
July 13, 2010, 10:10:19 PM »
Thanks Danijel,
setting the ModuleHost property works perfectly!
Kind regards
Michael
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Dashboard
-----------------------------
=> General
=> 3rd-Party
=> Quick Start
-----------------------------
Subscription
-----------------------------
=> Support
Loading...