... instead of having two if blocks share a single variable
for no obvious reason.
*/
char * redirect_mode;
#endif /* def FEATURE_FAST_REDIRECTS */
*/
char * redirect_mode;
#endif /* def FEATURE_FAST_REDIRECTS */
char *new_url = NULL;
char *redirection_string;
char *new_url = NULL;
char *redirection_string;
if (*redirection_string == 's')
{
if (*redirection_string == 's')
{
#ifdef FEATURE_HTTPS_INSPECTION
if (client_use_ssl(csp))
{
jb_err err;
#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,
if (err)
{
log_error(LOG_LEVEL_FATAL,
- 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))
{
#ifdef FEATURE_HTTPS_INSPECTION
if (client_use_ssl(csp))
{
#ifdef FEATURE_FAST_REDIRECTS
if ((csp->action->flags & ACTION_FAST_REDIRECTS))
{
#ifdef FEATURE_FAST_REDIRECTS
if ((csp->action->flags & ACTION_FAST_REDIRECTS))
{
redirect_mode = csp->action->string[ACTION_STRING_FAST_REDIRECTS];
/*
redirect_mode = csp->action->string[ACTION_STRING_FAST_REDIRECTS];
/*