Commit 0c3326e5 authored by mstrelan's avatar mstrelan Committed by japerry

Issue #1256878 by mstrelan: HTTP response render doesn't handle empty query string

parent 0af87d0b
......@@ -270,14 +270,18 @@ function page_manager_http_response_render($handler, $base_contexts, $args, $tes
$url = parse_url($path);
if (isset($url['query'])) {
$path = strtr($path, array('?' . $url['query'] => ''));
$info['query'] = $url['query'];
$info['query'] = array();
foreach (explode('&', $url['query']) as $query_part) {
list($key, $value) = explode('=', $query_part);
$info['query'][$key] = $value;
}
}
if (isset($url['fragment'])) {
$path = strtr($path, array('#' . $url['fragment'] => ''));
$info['fragment'] = $url['fragment'];
}
$info['destination'] = $path;
$info['destination'] = rtrim($path, '?');
}
return $info;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment