You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@httpd.apache.org by Jacek Prucia <ja...@7bulls.com> on 2002/08/29 13:30:08 UTC

[PATCH] some more URL test -- take 2

OK. This time patch included :)

regards,
-- 
Jacek Prucia
7bulls.com S.A.
http://www.7bulls.com/



Re: [PATCH] some more URL test -- take 2

Posted by Jacek Prucia <ja...@7bulls.com>.
[...]
> > +    // this schouldn't be hardcoded, but... :)
> C-style comments please:
> /* this shouldn't be hardcoded, but... :) */

Sorry. Gotta read StyleGuide again ;)

[...]
> > +        apr_file_printf (local_stderr, "Misformed URL -- auth data schould be outisde URL -- please see docs.\n");
> s/outisde/outside/

Doh!

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

Yep. It's on my plate for some time.

> Looks good otherwise.  -- justin

Revised patch included. Thanks for catching the typos.

regards,
-- 
Jacek Prucia
7bulls.com S.A.


Re: [PATCH] some more URL test -- take 2

Posted by Justin Erenkrantz <je...@apache.org>.
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