选择语言 :

 Module_Storage_Driver_Swift::build_request_line

null Module_Storage_Driver_Swift::build_request_line( )
File: ./modules/storage/driver/swift.class.php
protected function build_request_line($method, $uri, $query = null)
{
    if ($uri!='/')
    {
        $url_array = array();
        foreach (explode('/', $uri) as $i)
        {
            $url_array[] = rawurlencode($i);
        }
        $uri = implode('/', $url_array);
    }

    if ($query)
    {
        if (is_array($query))
        {
            foreach ($query as $key => $value)
            {
                $query_str .= '&' . rawurlencode($key) . '=' . rawurlencode($value) ;
            }
        }
        else
        {
            $query_str = $query;
        }

        $uri .= '?' . trim($query_str, '&');
    }

    $request_line = $method .' '. $uri .' '. $this->protocol_version . "\r\n";

    return $request_line;
}