httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jac...@apache.org
Subject cvs commit: httpd-test/flood flood_round_robin.c
Date Fri, 06 Sep 2002 09:35:56 GMT
jacekp      2002/09/06 02:35:56

  Modified:    flood    flood_round_robin.c
  Log:
  Catch every possible flaw in URL.
  
  Revision  Changes    Path
  1.27      +13 -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.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- flood_round_robin.c	1 Aug 2002 22:25:35 -0000	1.26
  +++ flood_round_robin.c	6 Sep 2002 09:35:55 -0000	1.27
  @@ -792,6 +792,19 @@
           apr_file_printf (local_stderr, "Misformed URL '%s'\n", r->uri);
           exit (APR_EGENERAL);
       }                                                                          
  +    if (r->parsed_uri->hostname[0] == '\0') {
  +        apr_file_printf (local_stderr, "Misformed URL '%s' -- can't find valid hostname.\n",
r->uri);
  +        exit (APR_EGENERAL);
  +    }
  +    /* this schouldn't be hardcoded, but... :) */
  +    if (apr_strnatcmp (r->parsed_uri->scheme, "http") != APR_SUCCESS && apr_strnatcmp
(r->parsed_uri->scheme, "https") != APR_SUCCESS) {
  +        apr_file_printf (local_stderr, "Wrong URL scheme '%s' -- only 'http' and 'https'
schemes are supported.\n", r->parsed_uri->scheme);
  +        exit (APR_EGENERAL);
  +    }
  +    if (r->parsed_uri->user != NULL || r->parsed_uri->password != NULL) {
  +        apr_file_printf (local_stderr, "Misformed URL -- auth data schould be outside URL
-- please see docs.\n");
  +        exit (APR_EGENERAL);
  +    }
       if (!r->parsed_uri->port)
       {
           r->parsed_uri->port = 
  
  
  

Mime
View raw message