*/
    function headers()
    {
        return $this->headers;
    }
    /**
     * Return Raw HTTP Request (note: This is incomplete)
     * @param bool ReBuild the Raw HTTP Request
     */
    function raw($refresh = false)
    {
        if (isset($this->raw) && !$refresh) {
            return $this->raw;
            // return cached
        }
        $headers = $this->headers();
        $this->raw = "{$this->method}\r\n";
        foreach ($headers as $i => $header) {
            $this->raw .= "{$i}: {$header}\r\n";
        }
        $this->raw .= "\r\n{$this->body}";
        return $this->raw;
    }
}
/**
*
* Echos the HTTP Request back the client/browser (in the HTTP Body)
*/
$http_request = new http_request();
$resp = $http_request->raw();
echo $resp;
Example #2
0
            if( file_exists("./junk/$filename") ){
                @unlink( "./junk/$filename");
            }
            @rename("./junk/$tmp","./junk/$filename");
        }
        */
    }
    echo '"success":true}';
    exit(0);
}
// for debug purposes...
if (!empty($_REQUEST['viewraw'])) {
    require dirname(__FILE__) . '/http_request.php';
    header('Content-Type:text/plain');
    $hr = new http_request();
    echo $hr->raw();
    echo "\r\n\r\n";
    echo "\n" . $_REQUEST['end'];
    echo "Body length: " . strlen($hr->body());
    exit(0);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html> 
<head> 
<title>Ext.ux.Uploader Samples</title>
<style type="text/css">
.progress{
    width: 200px;
    border: 1px solid #ccc;
}