Fix redirect scheme

personal/stbuehler/wip
Stefan Bühler 13 years ago
parent 1ffd7df84e
commit 748faf860f
  1. 6
      src/modules/mod_redirect.c

@ -244,13 +244,13 @@ static gboolean redirect_internal(liVRequest *vr, GString *dest, redirect_rule *
break;
case REDIRECT_ABSOLUTE_PATH:
/* /foo/bar?baz */
g_string_append_len(dest, CONST_STR_LEN(vr->con->is_ssl ? "https" : "http"));
g_string_append_len(dest, GSTR_LEN(vr->request.uri.scheme));
g_string_append_len(dest, CONST_STR_LEN("://"));
g_string_append_len(dest, GSTR_LEN(vr->request.uri.authority));
break;
case REDIRECT_RELATIVE_PATH:
/* foo/bar?baz */
g_string_append_len(dest, CONST_STR_LEN(vr->con->is_ssl ? "https" : "http"));
g_string_append_len(dest, GSTR_LEN(vr->request.uri.scheme));
g_string_append_len(dest, CONST_STR_LEN("://"));
g_string_append_len(dest, GSTR_LEN(vr->request.uri.authority));
/* search for last slash /foo/bar */
@ -263,7 +263,7 @@ static gboolean redirect_internal(liVRequest *vr, GString *dest, redirect_rule *
break;
case REDIRECT_RELATIVE_QUERY:
/* ?bar */
g_string_append_len(dest, CONST_STR_LEN(vr->con->is_ssl ? "https" : "http"));
g_string_append_len(dest, GSTR_LEN(vr->request.uri.scheme));
g_string_append_len(dest, CONST_STR_LEN("://"));
g_string_append_len(dest, GSTR_LEN(vr->request.uri.authority));
g_string_append_len(dest, GSTR_LEN(vr->request.uri.path));

Loading…
Cancel
Save