https://issues.apache.org/bugzilla/show_bug.cgi?id=53736
--- Comment #5 from Brian Kroth <[email protected]> --- So, I think I've figured out what the problem is here. Basically, we have IPv6 backends that include [] characters (eg: http://[fded:ff:cb23:608:b774:712c]). On the form submital, the w field is being ap_escape_uri()ed twice, so that [ becomes first %5b, and then %255b, but only ap_unescape_url()ed once. I've attached a patch that just does the existing ap_unescape_url() call twice (just wrapped in a for loop). There may be a better way to do that. Here's the steps I used to track this down. 1) Throw in a bunch of ap_log_error() calls around the while (args ...) processing, wsel instantiation, and other params checking blocks to dump debug information out to the log and rebuild mod_proxy_balancer.so 2) Load the /balancer-manager page. 3) Click on one of the backends to pull up the form. That results in output like the following: [Thu Feb 07 17:55:33 2013] [debug] mod_proxy_balancer.c(719): proxy: balancer-manager handler got escaped w=http://%5bfded:ff::cb23:608:b774:712c%5d [Thu Feb 07 17:55:33 2013] [debug] mod_proxy_balancer.c(729): proxy: balancer-manager handler got w=http://[fded:ff:cb23:608:b774:712c] [Thu Feb 07 17:55:33 2013] [debug] mod_proxy_balancer.c(733): proxy: balancer-manager handler stored w=http://[fded:ff::cb23:608:b774:712c] [Thu Feb 07 17:55:33 2013] [debug] mod_proxy_balancer.c(767): proxy: balancer-manager handler for balancer balancer://bpk-test_http_cluster requested worker http://[fded:ff::cb23:608:b774:712c], found ws http://[fded:ff::cb23:608:b774:712c], checking wsel http://[fded:ff::cb23:608:b774:712c] [Thu Feb 07 17:55:33 2013] [debug] mod_proxy_balancer.c(787): proxy: balancer-manager handler for balancer balancer://bpk-test_http_cluster requested worker http://[fded:ff::cb23:608:b774:712c] Notice that a) It's properly unescaping the w= GET parameter at that point. b) From that it finds and sets wsel correctly. 4) View the source for that page. You'll note that it generates the following html for an escaped w field: <input type=hidden name="w" value="http://%5bfded:ff::cb23:608:b774:712c%5d"> 5) Submit the form. That results in output like the following: [Thu Feb 07 17:55:39 2013] [debug] mod_proxy_balancer.c(719): proxy: balancer-manager handler got escaped w=http%3A%2F%2F%255bfded%3A%3Aff%3A%3Acb23%3A608%3Ab774%3A712c%255d [Thu Feb 07 17:55:39 2013] [debug] mod_proxy_balancer.c(729): proxy: balancer-manager handler got w=http://%5bfded:ff::cb23:608:b774:712c%5d [Thu Feb 07 17:55:39 2013] [debug] mod_proxy_balancer.c(733): proxy: balancer-manager handler stored w=http://%5bfded:ff::cb23:608:b774:712c%5d Notice that a) w is not entirely unescaped at this point, so that b) wsel doesn't get set, so that c) the if (wsel) processing bit to change the worker's parameters never gets processed. The attached patch fixes that. Let me know if you have any questions. Thanks, Brian -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
