Creates the resume URI.

@return string
334760
protected function createResumeUri()
    {
        $headers = $this->headers + [
            'Content-Type' => $this->contentType,
            'Content-Length' => 0,
            'x-goog-resumable' => 'start'
        ];

        $request = new Request(
            'POST',
            $this->uri,
            $headers
        );

        $response = $this->requestWrapper->send($request, $this->requestOptions);

        return $this->resumeUri = $response->getHeaderLine('Location');
    }
600883
public static function createFromString($uri) {

            $parts = parse_url($uri);

            $scheme     = (isset($parts['scheme']) ? $parts['scheme'] : '');

            $user       = new User(
                (isset($parts['user']) ? $parts['user'] : null),
                (isset($parts['pass']) ? $parts['pass'] : null)
            );

            $host       = new Host(isset($parts['host']) ? $parts['host'] : '');
            $port       = intval(isset($parts['port']) ? $parts['port'] : null);
            $path       = new Path(isset($parts['path']) ? $parts['path'] : '');

            if(!empty($parts['query'])) {
                $query  = Query::createFromString($parts['query']);
            }
            else {
                $query  = new Query(array());
            }


            $fragment   = (isset($parts['fragment']) ? $parts['fragment'] : '');

            return new self($scheme, $user, $host, $port, $path, $query, $fragment);

        }
66728
public static function createFromUri($uri)
    {
        $name = substr($uri, strrpos($uri, '/'));
        $path = sprintf('%s/%s', sys_get_temp_dir(), $name);
        copy($uri, $path);
        return static::createFromPath($path);
    }
382802
public static function createFromString($uri = ''): self
    {
        $components = UriString::parse($uri);

        return new self(
            $components['scheme'],
            $components['user'],
            $components['pass'],
            $components['host'],
            $components['port'],
            $components['path'],
            $components['query'],
            $components['fragment']
        );
    }
782287
public function uri()
    {
        $uri = (!empty($this->url['scheme']) ? $this->url['scheme'] . '://' : Server::getInstance()->get('scheme', ''));
        $uri .= (!empty($this->url['user']) ? $this->url['user'] . ':' . $this->url['pass'] . '@' : '');
        $uri .= (!empty($this->url['host']) ? $this->url['host'] : Server::getInstance()->get('host', ''));
        $uri .= (!empty($this->url['port']) ? ':' . $this->url['port'] : '');
        $uri .= (!empty($this->url['path']) ? $this->url['path'] : '');
        $uri .= (!empty($this->url['query']) ? '?' . $this->url['query'] : '');
        $uri .= (!empty($this->url['fragment']) ? '#' . $this->url['fragment'] : '');

        return $uri;
    }
343537
protected function prepareRequestUri()
    {
        $requestUri = '';

        if ($this->headers->has('X_REWRITE_URL') && false !== stripos(PHP_OS, 'WIN')) {
            // check this first so IIS will catch
            $requestUri = $this->headers->get('X_REWRITE_URL');
        } elseif ($this->server->get('IIS_WasUrlRewritten') == '1' && $this->server->get('UNENCODED_URL') != '') {
            // IIS7 with URL Rewrite: make sure we get the unencoded url (double slash problem)
            $requestUri = $this->server->get('UNENCODED_URL');
        } elseif ($this->server->has('REQUEST_URI')) {
            $requestUri = $this->server->get('REQUEST_URI');
            // HTTP proxy reqs setup request uri with scheme and host [and port] + the url path, only use url path
            $schemeAndHttpHost = $this->getScheme().'://'.$this->getHttpHost();
            if (strpos($requestUri, $schemeAndHttpHost) === 0) {
                $requestUri = substr($requestUri, strlen($schemeAndHttpHost));
            }
        } elseif ($this->server->has('ORIG_PATH_INFO')) {
            // IIS 5.0, PHP as CGI
            $requestUri = $this->server->get('ORIG_PATH_INFO');
            if ($this->server->get('QUERY_STRING')) {
                $requestUri .= '?'.$this->server->get('QUERY_STRING');
            }
        }

        return $requestUri;
    }
482754
public function resume()
    {
        $ResqueStatus = $this->ResqueStatus;

        $this->debug('Searching for paused workers');
        $options = new SendSignalCommandOptions();
        $options->title = 'Resuming workers';
        $options->noWorkersMessage = 'There is no paused workers to resume';
        $options->allOption = 'Resume all workers';
        $options->selectMessage = 'Worker to resume';
        $options->actionMessage = 'resuming';
        $options->workers = call_user_func(array($this->ResqueStatus, 'getPausedWorker'));
        $options->signal = 'CONT';
        $options->successCallback = function ($pid, $workerName) use ($ResqueStatus) {
            $ResqueStatus->setPausedWorker($workerName, false);
        };
        $options->schedulerWorkerActionMessage = 'Resuming the Scheduler Worker';

        $this->sendSignal($options);
    }
154246
protected function getHostFromUri()
    {
        $host = $this->uri->getHost();
        $host .= $this->uri->getPort() ? ':' . $this->uri->getPort() : '';

        return $host;
    }
1265337
public static function returnUrl()
    {
        if (self::$returnUrl === null) {
            $url = ['/' . ltrim(Yii::$app->requestedRoute, '/')];
            foreach (Yii::$app->request->queryParams as $key => $value) {
                $url[$key] = $value;
            }
            self::$returnUrl = Url::to($url);

        }
        return self::$returnUrl;
    }
766136
public function _uri() {
        //处理requestUri
        $requestUri = '/';

        if (isset($_SERVER['HTTP_X_REWRITE_URL'])) { // check this first so IIS will catch
            $requestUri = $_SERVER['HTTP_X_REWRITE_URL'];
        }
        elseif (
            // IIS7 with URL Rewrite: make sure we get the unencoded url (double slash problem)
            isset($_SERVER['IIS_WasUrlRewritten'])
            && $_SERVER['IIS_WasUrlRewritten'] == '1'
            && isset($_SERVER['UNENCODED_URL'])
            && $_SERVER['UNENCODED_URL'] != ''
        ) {
            $requestUri = $_SERVER['UNENCODED_URL'];
        }
        elseif (isset($_SERVER['REQUEST_URI'])) {
            $requestUri = $_SERVER['REQUEST_URI'];
            $parts = @parse_url($requestUri);

            if (isset($_SERVER['HTTP_HOST']) && strstr($requestUri, $_SERVER['HTTP_HOST'])) {
                if (false !== $parts) {
                    $requestUri = (empty($parts['path']) ? '' : $parts['path'])
                        . ((empty($parts['query'])) ? '' : '?' . $parts['query']);
                }
            }
            elseif (!empty($_SERVER['QUERY_STRING']) && empty($parts['query'])) {
                // fix query missing
                $requestUri .= '?' . $_SERVER['QUERY_STRING'];
            }
        }
        elseif (isset($_SERVER['ORIG_PATH_INFO'])) { // IIS 5.0, PHP as CGI
            $requestUri = $_SERVER['ORIG_PATH_INFO'];
            if (!empty($_SERVER['QUERY_STRING'])) {
                $requestUri .= '?' . $_SERVER['QUERY_STRING'];
            }
        }

        return $requestUri;
    }
301139
public static function createFromString (string $uri)
    {
        $parts = parse_url($uri);
        $scheme = isset($parts['scheme']) ? $parts['scheme'] : '';
        $user = isset($parts['user']) ? $parts['user'] : '';
        $pass = isset($parts['pass']) ? $parts['pass'] : '';
        $host = isset($parts['host']) ? $parts['host'] : '';
        $port = isset($parts['port']) ? $parts['port'] : null;
        $path = isset($parts['path']) ? $parts['path'] : '';
        $query = isset($parts['query']) ? $parts['query'] : '';
        $fragment = isset($parts['fragment']) ? $parts['fragment'] : '';

        return new \Resilient\Http\Uri($scheme, $host, $port, $path, $query, $fragment, $user, $pass);
    }
354145
protected function getRewriteUri()
    {
        if ($this->uriSource === self::URI_SOURCE_SERVER_REQUEST_URI) {
            if (isset($_SERVER['REQUEST_URI'])) {
                $requestUri = explode('?', $_SERVER['REQUEST_URI']);
                if (!empty($requestUri[0])) {
                    return $requestUri[0];
                }
            }
        } else {
            if (isset($_GET['_url']) && !empty($_GET['_url'])) {
                return $_GET['_url'];
            }
        }

        return '/';
    }
853852
public static function createFromPsr7(Psr7UriInterface $uri): self
    {
        $components = [
            'scheme' => null,
            'user' => null,
            'pass' => null,
            'host' => null,
            'port' => $uri->getPort(),
            'path' => $uri->getPath(),
            'query' => null,
            'fragment' => null,
        ];

        $scheme = $uri->getScheme();
        if ('' !== $scheme) {
            $components['scheme'] = $scheme;
        }

        $fragment = $uri->getFragment();
        if ('' !== $fragment) {
            $components['fragment'] = $fragment;
        }

        $query = $uri->getQuery();
        if ('' !== $query) {
            $components['query'] = $query;
        }

        $host = $uri->getHost();
        if ('' !== $host) {
            $components['host'] = $host;
        }

        $user_info = $uri->getUserInfo();
        if (null !== $user_info) {
            [$components['user'], $components['pass']] = explode(':', $user_info, 2) + [1 => null];
        }

        return Uri::createFromComponents($components);
    }
836103
private function getUri()
    {
        if (empty($this->uri) && ($this->uri !== false)) {
            $this->uri = $_SERVER['REQUEST_URI'];

            // Remove the parameters from the URI.
            $paramsStart = strpos($this->uri, '?');
            if ($paramsStart !== false) {
                $this->uri = substr($this->uri, 0, $paramsStart);
            }
        }

        return $this->uri;
    }
1138257
protected function getReturnUrl()
	{
	    if($this->getServiceLocator()->has(ReturnUrlService::SERVICE_ID)){
            $deliveryExecution = $this->getCurrentDeliveryExecution();
            return $this->getServiceLocator()->get(ReturnUrlService::SERVICE_ID)->getReturnUrl($deliveryExecution->getIdentifier());
        }
	    return _url('index', 'DeliveryServer', 'taoDelivery');
	}
686315
public function getUrl()
    {
        if ($this->findDocumentRootInScriptFileName() === $this->removeLastSlash($this->root)) {
            return $this->getRequestUri();
        }
        $path = $this->server->get('PATH_INFO');

        return $path;
    }
679337
public function getRestrictionId(): \Psr\Http\Message\UriInterface
    {
        if (!$this->restrictionId) {
            return new Uri();
        }

        return $this->restrictionId;
    }