diff --git a/NEWS b/NEWS index a57e71d2..c63adf69 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,7 @@ NEWS * Remove link from errormsg about fastcgi apps (fixes #1942) * Strip trailing dot from "Host:" header * Remove the optional port info from SERVER_NAME (thx Mr_Bond) + * Fix mod_proxy RoundRobin (off by one problem if only one backend is up) - 1.4.22 - 2009-03-07 * Fix wrong lua type for CACHE_MISS/CACHE_HIT in mod_cml (fixes #533) diff --git a/src/mod_proxy.c b/src/mod_proxy.c index 74a0bdb7..ba20ebab 100644 --- a/src/mod_proxy.c +++ b/src/mod_proxy.c @@ -1209,7 +1209,7 @@ static handler_t mod_proxy_check_extension(server *srv, connection *con, void *p if (ndx >= (int) extension->value->used) { /* didn't found a higher id, wrap to the start */ - for (ndx = 0; ndx < (int) k; ndx++) { + for (ndx = 0; ndx <= (int) k; ndx++) { host = (data_proxy *)extension->value->data[ndx]; if (!host->is_disabled) break; }