*/
char * redirect_mode;
#endif /* def FEATURE_FAST_REDIRECTS */
- char *old_url = NULL;
char *new_url = NULL;
char *redirection_string;
if (*redirection_string == 's')
{
+ char *requested_url;
+
#ifdef FEATURE_HTTPS_INSPECTION
if (client_use_ssl(csp))
{
jb_err err;
- old_url = strdup_or_die("https://");
- err = string_append(&old_url, csp->http->hostport);
- if (!err) err = string_append(&old_url, csp->http->path);
+ requested_url = strdup_or_die("https://");
+ err = string_append(&requested_url, csp->http->hostport);
+ if (!err) err = string_append(&requested_url, csp->http->path);
if (err)
{
log_error(LOG_LEVEL_FATAL,
else
#endif
{
- old_url = csp->http->url;
+ requested_url = csp->http->url;
}
- new_url = rewrite_url(old_url, redirection_string);
+ new_url = rewrite_url(requested_url, redirection_string);
#ifdef FEATURE_HTTPS_INSPECTION
if (client_use_ssl(csp))
{
- freez(old_url);
+ freez(requested_url);
}
#endif
}
#ifdef FEATURE_FAST_REDIRECTS
if ((csp->action->flags & ACTION_FAST_REDIRECTS))
{
+ char *old_url;
+
redirect_mode = csp->action->string[ACTION_STRING_FAST_REDIRECTS];
/*