You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Christophe JAILLET <ch...@wanadoo.fr> on 2015/11/27 20:21:32 UTC

Bug in mod_proxvy_fdpass?

Hi,

smatch compains that:
     /modules/proxy/mod_proxy_fdpass.c:152 proxy_fdpass_handler() warn: 
this array is probably non-NULL. 'worker->s->flusher'

I think that:
         const char *flush_method = worker->s->flusher ? 
worker->s->flusher : "flush";
should be turned into:
         const char *flush_method = *worker->s->flusher ? 
worker->s->flusher : "flush";


'flusher' is defined as follow:
         /* Runtime worker status informations. Shared in scoreboard */
         typedef struct {
         [...]
             char      flusher[PROXY_WORKER_MAX_SCHEME_SIZE];  /* flush 
provider used by mod_proxy_fdpass */
         [...]
         } proxy_worker_shared;

So, it can not be NULL.
I think that the logic is "If the flusher name is defined, use it, 
otherwise use the default"
Correct?



BTW, the 'flusher' parameter (mod_proxy.c:269) seems to be 
un-documented. 
(http://httpd.apache.org/docs/trunk/mod/mod_proxy.html#proxypass)


What puzzles me is that, with the current code, if the "flusher" 
parameter is not defined, then the code should always trigger an 01153 
error.
And if this parameter is not documented, how one could know that it has 
to be set?

Either no-one ever used this, either the users know that an undocumented 
parameter has to be used. (either I missed something :) )
Doc and code should be fixed.


CJ