From 7a4bbe2e1d00388d0159643c57f2ee33fec05f63 Mon Sep 17 00:00:00 2001
From: Eric Rasmussen <ericrasmussen1@gmail.com>
Date: Mon, 18 Feb 2013 15:50:04 -0600
Subject: [PATCH] [gh-419] If proxypass include querystring in rebuilt
 $_SERVER['REQUEST_URI']

---
 includes/unl_bootstrap.inc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/includes/unl_bootstrap.inc b/includes/unl_bootstrap.inc
index 331970045..ebd2bde6c 100644
--- a/includes/unl_bootstrap.inc
+++ b/includes/unl_bootstrap.inc
@@ -85,13 +85,16 @@ function unl_bootstrap_multisite_without_symlinks() {
 }
 
 /**
- * Fix some paths when used through a ProxyPass
+ * Fix some paths when used through a ProxyPass.
  */
 function unl_bootstrap_proxy_pass_support() {
   if (isset($_SERVER['HTTP_X_FORWARDED_HOST']) && isset($_SERVER['HTTP_X_FORWARDED_PATH'])) {
     $GLOBALS['base_url'] = 'http://' . $_SERVER['HTTP_X_FORWARDED_HOST'] . $_SERVER['HTTP_X_FORWARDED_PATH'];
     $GLOBALS['cookie_domain'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
     $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_FORWARDED_PATH'] . '/' . request_path();
+    if (isset($_SERVER['REDIRECT_QUERY_STRING'])) {
+      $_SERVER['REQUEST_URI'] .= '?' . $_SERVER['REDIRECT_QUERY_STRING'];
+    }
   }
 }
 
-- 
GitLab