-const char filters_rcs[] = "$Id: filters.c,v 1.67 2006/11/28 15:19:43 fabiankeil Exp $";
+const char filters_rcs[] = "$Id: filters.c,v 1.68 2006/12/05 14:45:48 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/filters.c,v $
*
* Revisions :
* $Log: filters.c,v $
+ * Revision 1.68 2006/12/05 14:45:48 fabiankeil
+ * Make sure get_last_url() behaves like advertised
+ * and fast-redirects{} can be combined with redirect{}.
+ *
* Revision 1.67 2006/11/28 15:19:43 fabiankeil
* Implemented +redirect{s@foo@bar@} to generate
* a redirect based on a rewritten version of the
subject = new_url;
}
- log_error(LOG_LEVEL_REDIRECTS, "Checking \"%s\" for redirects", subject);
+ log_error(LOG_LEVEL_REDIRECTS, "Checking \"%s\" for redirects.", subject);
/*
* Find the last URL encoded in the request
{
new_url = tmp++;
}
+ tmp = new_url;
+ while ((tmp = strstr(tmp, "https://")) != NULL)
+ {
+ new_url = tmp++;
+ }
- if (new_url != subject || (0 == strncmpic(subject, "http://", 7)))
+ if ((new_url != subject)
+ || (0 == strncmpic(subject, "http://", 7))
+ || (0 == strncmpic(subject, "https://", 8)))
{
/*
* Return new URL if we found a redirect