Content Truncating

Michael Shadle mike503 at gmail.com
Wed Apr 8 04:15:44 MSD 2009


On Tue, Apr 7, 2009 at 4:56 PM, michael <nginx-forum at nginx.us> wrote:
> When will I not need to calculate Content-Length? When using X-Accel or when using PHP readfile()...? With X-Accel, yes, I should not need to calculate the Content-Length... What about when/if using readfile()

when you use x-accel.

when you use readfile i would expect you have to provide -all- the headers. :)

Right now this is all I have for mine and it works like a charm:

header("Content-Disposition: attachment;
filename=\"".urldecode(basename($file))."\";");
header("Content-Type: application/force-download");
header("X-Accel-Redirect: $file_uri");





More information about the nginx mailing list