Hello,

we have a site running cherokee 1.2.2 behind pound 2.5 (to take care of
TLS) on debian squeeze.

The site consists of static files and PHP (5.3.3-7+squeeze1) only. The
vhost has 3 rules:

- Redirect Non-TLS to TLS
- Use FastCGI Backend (php-cgi) for php files
- Default: List & Send with I/O-Cache enabled

That means, cherokee takes external requests on port 80 only to redirect
them to 443 (pound).
Pound takes external requests on port 443 and uses localhost:80 to talk
to cherokee.

Keep-Alive and Chunked Encoding are both enabled (if that matters).

The site contains a file.php to take care of special file downloads.
After initially switching from nginx to cherokee, we've been running
into lots of trouble with that file.php and truncated downloads. Part of
that was solved using pound for TLS but there have still been issues
with specific files since file.php was piping files through PHP
completely.

After switching to X-Sendfile, everything looked good. However, we
received notice that some downloads are still being truncated every once
in a while. We have not been able to pinpoint the cause yet, but we have
only seen it happen with IE 8 (other versions could be affected too).

file.php produces 4 headers:

Content-Type: application/force-download
Content-Length: filesize($filepath)
Content-Disposition: attachment; filename="$filename"
X-Sendfile: $filepath

Sniffing the traffic between pound and cherokee revealed that
Content-Length is NOT being sent out by cherokee. Thus, the
client/browser does NOT know about the total filesize and cannot even
detect if the file was completely transferred or not.

Also, the transfer is gzipped (Content-Encoding: gzip) and cherokees
access.log reports differing sizes for the same file. Could that have to
do with gzip?

So that leaves three questions:

Why are downloads truncated sometimes?
Why does cherokee not send Content-Length although it is explicitly
given by the PHP backend?
Why are access logs reporting differing sizes for the same file?

Any ideas and/or suggestions?

Thanks in advance
Ringo
_______________________________________________
Cherokee mailing list
[email protected]
http://lists.octality.com/listinfo/cherokee

Reply via email to