On Sun, Dec 14, 2008 at 6:37 AM, Sorin Manolache <[email protected]> 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

Reply via email to