Returns the query string part of the servlet URI, or null if none.
Same as the CGI variable QUERY_STRING.
960368
public String getQueryString()
    {
        if (WCCustomProperties.CHECK_REQUEST_OBJECT_IN_USE){
            checkRequestObjectInUse();
        }
        SRTServletRequestThreadData reqData = SRTServletRequestThreadData.getInstance();
        if (reqData.getQueryString()==null && !reqData.isQSSetExplicit())
            if (_request != null && reqData != null) {
                reqData.setQueryString(_request.getQueryString());             
            }
        // 321485
        String queryString = null;
        if (reqData != null)
            queryString = reqData.getQueryString();
        if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
            logger.logp(Level.FINE, CLASS_NAME,"getQueryString", " queryString --> " + PasswordNullifier.nullifyParams(queryString));
        }
        return queryString;
    }
43249
function _fetch_uri_string() {
		$uri="";
		if ($this->uri_protocol == 'AUTO') {
			// Is the request coming from the command line?
			if (php_sapi_name() == 'cli' || defined('STDIN')) {
				$this->_set_uri_string($this->_parse_cli_args());
				return;
			}

			// Let's try the REQUEST_URI first, this will work in most situations
			if ($uri=$this->_detect_uri()) {
				$this->_set_uri_string($uri);
				return;
			}

			// Is there a PATH_INFO variable?
			// Note: some servers seem to have trouble with getenv() so we'll test it two ways
			$path=(isset($_SERVER['PATH_INFO'])) ? $_SERVER['PATH_INFO'] : @getenv('PATH_INFO');
			if (trim($path, '/') != '' && $path != "/" . SELF) {
				$this->_set_uri_string($path);
				return;
			}

			// No PATH_INFO?... What about QUERY_STRING?
			$path=(isset($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] : @getenv('QUERY_STRING');
			if (trim($path, '/') != '') {
				$this->_set_uri_string($path);
				return;
			}

			// As a last ditch effort lets try using the $_GET array
			if (\is_array($_GET) && count($_GET) == 1 && trim(key($_GET), '/') != '') {
				$this->_set_uri_string(key($_GET));
				return;
			}

			// We've exhausted all our options...
			$this->uri_string='';
			return;
		}

		if ($uri == 'REQUEST_URI') {
			$this->_set_uri_string($this->_detect_uri());
			return;
		}

		$path=(isset($_SERVER[$uri])) ? $_SERVER[$uri] : @getenv($uri);
		$this->_set_uri_string($path);
	}
896097
@Override
    public String getQueryString() {
        try {
            collaborator.preInvoke(componentMetaData);
            return request.getQueryString();
        } finally {
            collaborator.postInvoke();
        }
    }
91855
public static String getUriFromRequest(HttpServletRequest request) {
        Object includeUri = request.getAttribute("javax.servlet.include.request_uri");
        return includeUri == null ? request.getRequestURI() : (String)includeUri;
    }
607248
public String toQueryString() {
        String encoding = request.getCharacterEncoding();
        try {
            return WebUtils.toQueryString(this, encoding);
        }
        catch (UnsupportedEncodingException e) {
            throw new ControllerExecutionException("Unable to convert parameter map [" + this +
                 "] to a query string: " + e.getMessage(), e);
        }
    }
109785
def make_query_string(params)
      clean_params(params).collect do |k, v|
        CGI.escape(k) + '=' + CGI.escape(v)
      end.join('&')
    end
819115
public static function getQueryString(Request $request): ?string
    {
        $qs = $request->server->get('QUERY_STRING', '');
        if ('' === $qs) {
            return null;
        }

        $parts = [];

        foreach (explode('&', $qs) as $param) {
            if ('' === $param || '=' === $param[0]) {
                // Ignore useless delimiters, e.g. "x=y&".
                // Also ignore pairs with empty key, even if there was a value, e.g. "=value", as such nameless values cannot be retrieved anyway.
                // PHP also does not include them when building _GET.
                continue;
            }

            $keyValuePair = explode('=', $param, 2);

            // GET parameters, that are submitted from a HTML form, encode spaces as "+" by default (as defined in enctype application/x-www-form-urlencoded).
            // PHP also converts "+" to spaces when filling the global _GET or when using the function parse_str. This is why we use urldecode and then normalize to
            // RFC 3986 with rawurlencode.
            $parts[] = isset($keyValuePair[1]) ?
                rawurlencode(urldecode($keyValuePair[0])).'='.rawurlencode(urldecode($keyValuePair[1])) :
                rawurlencode(urldecode($keyValuePair[0]));
        }

        return implode('&', $parts);
    }
533639
public static function getURI() {
        if (isset($_SERVER ['REQUEST_URI'])) {
            if (WWWROOT_DIR != '/') {
                $uri = substr($_SERVER ['REQUEST_URI'], strlen(WWWROOT_DIR) - 1);
            } else {
                $uri = $_SERVER ['REQUEST_URI'];
            }

            return $uri;
        }

        return null;
    }
527288
@Override
    public String getURL() {
        ServletRESTRequestImpl ret = castRequest();
        if (ret != null)
            return ret.getURL();
        return null;
    }
995152
public static String getFullRequestUrl(HttpServletRequest request) {
        StringBuilder buff = new StringBuilder(
                request.getRequestURL().toString());
        String queryString = request.getQueryString();
        if (queryString != null) {
            buff.append("?").append(queryString);
        }

        return buff.toString();
    }
460719
def uri(self):
        """"""
        uristring = self.path
        if self.query:
            uristring += "?{}".format(self.query)
        if self.fragment:
            uristring += "#{}".format(self.fragment)

        return uristring
399047
public static String getModulePathForRelativeURI( String uri )
    {
        if ( uri == null ) return null;
        assert uri.length() > 0;
        assert uri.charAt( 0 ) == '/' : uri;

        // Strip off the actual page name (e.g., some_page.jsp)
        int slash = uri.lastIndexOf( '/' );
        uri = uri.substring( 0, slash );

        return uri;
    }
1182199
public static String getRequestURL(HttpServletRequest req, boolean includeQueryString) {

	StringBuffer sb = req.getRequestURL();
	int maxpos = sb.indexOf("/", 8);

	if (maxpos > -1) {

	    if (req.isSecure()) {
		if (sb.substring(maxpos - 4, maxpos).equals(":443")) sb.delete(maxpos - 4, maxpos);
	    }
	    else {
		if (sb.substring(maxpos - 3, maxpos).equals(":80")) sb.delete(maxpos - 3, maxpos);
	    }

	    if (includeQueryString && !StringUtil.isEmpty(req.getQueryString())) sb.append('?').append(req.getQueryString());
	}

	return sb.toString();
    }
872623
function querystring(query) {
      var parser = /([^=?&]+)=([^&]*)/g
        , result = {}
        , part;

      //
      // Little nifty parsing hack, leverage the fact that RegExp.exec increments
      // the lastIndex property so we can continue executing this loop until we've
      // parsed all results.
      //
      for (;
        part = parser.exec(query);
        result[decodeURIComponent(part[1])] = decodeURIComponent(part[2])
      );

      return result;
    }
257937
def request_url(req=None):
    
    from uliweb import request

    r = req or request
    if request:
        if r.query_string:
            return r.path + '?' + r.query_string
        else:
            return r.path
    else:
        return ''
247903
function(url) {
		var query = getQueryString(url);
		for (var name in query) {
			if (query[name] === '?') {
				return name;
			}
		}
		return null;
	}
361942
public static function URI()
    {
        $REDIRECT_QUERY_STRING =
            isset($_SERVER['QUERY_STRING'])
            ? $_SERVER['QUERY_STRING']
            : '';

        $REDIRECT_URL = '';

        if (isset($_SERVER['REQUEST_URI'])) {
            $url_parts = parse_url($_SERVER['REQUEST_URI']);
            $REDIRECT_URL = $url_parts['path'];
        }

        $URI = rtrim(dirname($_SERVER['SCRIPT_NAME']), '/');

        if (substr($REDIRECT_URL, 0, strlen($URI)) == $URI) {
            $URI = substr($REDIRECT_URL, strlen($URI));
        }

        $URI = urldecode($URI) . '/';

        $URI = trim($URI, '/');

        $parameters = [];

        //Extract parameters from QUERY string
        parse_str($REDIRECT_QUERY_STRING, $parameters);

        return [$URI, $parameters];
    }