Hello,
I'm developing a xhr uploading script by using http://github.com/valums/file-uploader
But nginx has no apache_request_headers function, and find from php.net an replicement.
[code]
function _apache_request_headers() {
foreach($_SERVER as $key=>$value) {
if (substr($key,0,5)=="HTTP_") {
$key=str_replace(" ","-",ucwords(strtolower(str_replace("_"," ",substr($key,5)))));
$out[$key]=$value;
}
}
return $out;
}
[/code]
my problem is that upload script has following function that needs a content-lenght param which nginx does not have
[code]
function getSize(){
$headers = [b]apache_request_headers[/b]();
return (int)[b]$headers['Content-Length'][/b];
}
[/code]
so I add an extra param to my site config
[code]
fastcgi_param CONTENT-LENGTH $content_length;
[/code]
this parameter is needed for how much bytes uploaded to the server (maybe I get it wrong)
how can I fix this problem? Thanks for all (sorry for my poor english)