[OGo-Developer] Bugs in mod_ngobjweb

Stéphane Corthésy developer@opengroupware.org
Thu, 27 Mar 2008 09:49:06 +0100


Hi,

On Mar 26, 2008, at 7:54 PM, Helge Hess wrote:

> On 26.03.2008, at 18:18, Stéphane Corthésy wrote:
>> I found bugs in mod_ngobjweb:
>>
>> In NGBufferedDescriptor.c, at the beginning of  
>> NGBufferedDescriptor_read(), availBytes is initialized by  
>> numberOfAvailableReadBufferBytes(self), whereas the test "if(self  
>> == NULL)" is done later; this could crash. BTW,  
>> numberOfAvailableReadBufferBytes(self) should be called only just  
>> before "if (availBytes >= _len)".
>>
>> In handler.c:
>> Around line 721, after NGBufferedDescriptor_safeRead(), you free  
>> 'toApp', but don't NULLify it, and some lines later the pointer is  =

>> freed again when not NULL.
>> BTW, there is a "#if HEAVY_LOG" whereas everywhere else you use "if =

>> (HEAVY_LOG)".
>
>
> Thanks, the two things are committed (r1619).
>
> BTW: technically its possible to use mod_proxy of Apache 2.2 with  
> SOPE, it has plenty of options to downgrade the HTTP connection for  =

> the proxied backend.
>
> The biggest issue is that there is no non-streaming mode (which  
> blocks the appserver on remote IO), but maybe this can be emulated  
> somehow by configuring very large HTTP buffers.


Does this mean that mod_ngobjweb does not support file upload?
I know very little about apache, bear with me.
Currently I have this config:

         <LocationMatch "^/PPUREdit*">
                 SetHandler ngobjweb-adaptor
                 SetAppPort 20000
         </LocationMatch>

Am I supposed to change it to

         <LocationMatch "^/PPUREdit*">
                 SetHandler ngobjweb-adaptor
                 SetAppPort 20000
ProxyPass        http://127.0.0.1:20000/PPUREdit
ProxyPassReverse http://127.0.0.1:20000/PPUREdit
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive       1

         </LocationMatch>

Stéphane

> 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
> -- 
> Helge Hess
> http://www.helgehess.eu/--
> OpenGroupware.org Developer
> developer@opengroupware.org
> http://mail.opengroupware.org/mailman/listinfo/developer