httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Carleton" <scarle...@miltonstreet.com>
Subject Re: internal redirect
Date Sun, 14 Dec 2008 16:59:28 GMT
On Sun, Dec 14, 2008 at 6:37 AM, Sorin Manolache <sorinm@gmail.com> wrote:

> I think the 500 was caused by an infinite loop:

> if (!ap_is_initial_req(r))
>  return DECLINED;
> const char *note = apr_table_get(r->notes, "my_note");
> if (note != 0 && strcmp(note, "should_redirect"))
>  ap_internal_redirect(h, "/invalidClient.html");

I am with you and I see the loop in my code.  I am doing things a
little different, I am setting the note to the redirect uri:

    if (!ap_is_initial_req(r))
        return DECLINED;

    const char * redirection = apr_table_get(r->notes, "promenade_redirect");

    if( redirection)   {
        ap_internal_redirect( redirection, r);
        return OK;
    }
    return DECLINED;

The check at the beginning is short circuiting the handler correctly,
but I am still getting a status code of 500.  Any thought?

Sam

Mime
View raw message