httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@apache.org>
Subject Re: [PATCH] some more URL test -- take 2
Date Thu, 29 Aug 2002 15:34:01 GMT
On Thu, Aug 29, 2002 at 01:30:08PM +0200, Jacek Prucia wrote:
> --- flood_round_robin.c.orig	2002-08-29 12:55:37.000000000 +0200
> +++ flood_round_robin.c	2002-08-29 13:03:45.000000000 +0200
> @@ -792,6 +792,20 @@
>          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... :)

C-style comments please:

/* this shouldn'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 outisde
URL -- please see docs.\n");

s/outisde/outside/

> +        apr_file_printf (local_stderr, "Please note, that auth isn't working right now\n");
> +        exit (APR_EGENERAL);
> +    }

BTW, basic auth shouldn't be *too* hard to add.  It's just need to
send the appropriate WWW-Authenticate headers.

Looks good otherwise.  -- justin

Mime
View raw message