Re: [twsocket] Creating a TSslWebAppSrv component

2011-11-28 Thread Arno Garrels
Arno Garrels wrote:
> Busai Péter wrote:
>> What do you mean "not nice"? This is the whole point of OOP. :)
> 
> Not nice are both custom source code changes and duplicated code.
> However in this case I'd vote for a custom change of one line in
> OverbyteIcsHttpAppServer.pas: "THttpAppSrv = class(TSslHttpServer)".

This requires a rebuild of the ICS packages and define USE_SSL has
to added to your applications's project options.

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Creating a TSslWebAppSrv component

2011-11-28 Thread Arno Garrels
Busai Péter wrote:
> What do you mean "not nice"? This is the whole point of OOP. :)

Not nice are both custom source code changes and duplicated code.
However in this case I'd vote for a custom change of one line in 
OverbyteIcsHttpAppServer.pas: "THttpAppSrv = class(TSslHttpServer)".
SVN updates won't neither see conflicts nor overwrite this change. 
In order to make it work without SSL set property WSocketServer.SslEnable
to False in your app.. 
If you used source from the IPv6 branch there's new property
MultiListenSockets which makes it possible to serve HTTP and HTTPS
with just one server instance (still beta).

> 
> Actually it is not that simple. I don't want to put TSslHttpAppSrv in
> the original unit of THttpAppSrv because SVN will complain every time
> I do a check-out.
> I tried to put it in a new unit, however it seems THttpAppSrv and
> TUrlHandler are "friends". Code in HttpAppSrv accessing protected
> variables in UrlHandler. So do I have to dup TUrlHandler as well ?

Plenty of duplicated code is IMO more difficult to maintain than just
one single custom line, isn't it?

-- 
Arno Garrels


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Creating a TSslWebAppSrv component

2011-11-28 Thread Busai Péter
What do you mean "not nice"? This is the whole point of OOP. :)

Actually it is not that simple. I don't want to put TSslHttpAppSrv in
the original unit of THttpAppSrv because SVN will complain every time I
do a check-out.
I tried to put it in a new unit, however it seems THttpAppSrv and
TUrlHandler are "friends". Code in HttpAppSrv accessing protected
variables in UrlHandler. So do I have to dup TUrlHandler as well ?

Regards
Peter

>> Hi,
>> I wonder what is the proper way,
>> to derive from TSslHttpServer and copy all the AppServer stuff
>> or to derive from THttpAppSrv and add the SSL stuff?
> It's likely the easiest approach to derive THttpAppSrv from
> THttpsServer rather than from THttpServer (untested).
> This required change of one single line in source code, not nice,
> however should work. 
>
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Creating a TSslWebAppSrv component

2011-11-28 Thread Arno Garrels
Busai Péter wrote:
> Hi,
> I wonder what is the proper way,
> to derive from TSslHttpServer and copy all the AppServer stuff
> or to derive from THttpAppSrv and add the SSL stuff?

It's likely the easiest approach to derive THttpAppSrv from
THttpsServer rather than from THttpServer (untested).
This required change of one single line in source code, not nice,
however should work. 

-- 
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Creating a TSslWebAppSrv component

2011-11-27 Thread Busai Péter
Hi,
I wonder what is the proper way,
to derive from TSslHttpServer and copy all the AppServer stuff
or to derive from THttpAppSrv and add the SSL stuff?

Regards
Peter

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be