aaron 2002/08/01 15:25:35
Modified: flood flood_round_robin.c
Log:
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 <[EMAIL PROTECTED]>
Reviewed by: Aaron Bannert
Revision Changes Path
1.26 +4 -0 httpd-test/flood/flood_round_robin.c
Index: flood_round_robin.c
===================================================================
RCS file: /home/cvs/httpd-test/flood/flood_round_robin.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- flood_round_robin.c 1 Jul 2002 17:38:16 -0000 1.25
+++ flood_round_robin.c 1 Aug 2002 22:25:35 -0000 1.26
@@ -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 =