Catch badly formed URLs and exit. This is a good temporary fix,
but eventually we should probably rethink how we catch errors
and bubble them up instead of exiting right away.
Submitted by: Jacek Prucia <jacek.prucia@7bulls.com>
Reviewed by: Aaron Bannert
git-svn-id: https://svn.apache.org/repos/asf/httpd/test/trunk/flood@96279 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/flood_round_robin.c b/flood_round_robin.c
index 0f2cf4b..43e9923 100644
--- a/flood_round_robin.c
+++ b/flood_round_robin.c
@@ -788,6 +788,10 @@
r->parsed_uri = apr_pcalloc(rp->pool, sizeof(apr_uri_t));
apr_uri_parse(rp->pool, r->uri, r->parsed_uri);
+ if (r->parsed_uri->scheme == NULL || r->parsed_uri->hostname == NULL) {
+ apr_file_printf (local_stderr, "Misformed URL '%s'\n", r->uri);
+ exit (APR_EGENERAL);
+ }
if (!r->parsed_uri->port)
{
r->parsed_uri->port =