[OGo-Developer] Bugs in mod_ngobjweb
Helge Hess
developer@opengroupware.org
Wed, 26 Mar 2008 19:54:41 +0100
On 26.03.2008, at 18:18, St=E9phane Corth=E9sy wrote:
> I found bugs in mod_ngobjweb:
>
> In NGBufferedDescriptor.c, at the beginning of =20
> NGBufferedDescriptor_read(), availBytes is initialized by =20
> numberOfAvailableReadBufferBytes(self), whereas the test "if(self =3D=3D=
=20
> NULL)" is done later; this could crash. BTW, =20
> numberOfAvailableReadBufferBytes(self) should be called only just =20
> before "if (availBytes >=3D _len)".
>
> In handler.c:
> Around line 721, after NGBufferedDescriptor_safeRead(), you free =20
> 'toApp', but don't NULLify it, and some lines later the pointer is =20
> freed again when not NULL.
> BTW, there is a "#if HEAVY_LOG" whereas everywhere else you use =20
> "if(HEAVY_LOG)".
Thanks, the two things are committed (r1619).
BTW: technically its possible to use mod_proxy of Apache 2.2 with =20
SOPE, it has plenty of options to downgrade the HTTP connection for =20
the proxied backend.
The biggest issue is that there is no non-streaming mode (which blocks =20=
the appserver on remote IO), but maybe this can be emulated somehow by =20=
configuring very large HTTP buffers.
Eg:
---snip---
ProxyRequests Off # no forward proxy, only reverse
ProxyPreserveHost On # Apache 2.0.31 and later
ProxyVia block
ProxyBadHeader StartBody
<Location /zidestore>
ProxyPass http://127.0.0.1:21000/zidestore
ProxyPassReverse http://127.0.0.1:21000/zidestore
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
</Location>
---snap---
Greets,
Helge
--=20
Helge Hess
http://www.helgehess.eu/=