contao/import — Issue #3602: Controller::sendFileToBrowser() - close connection
Author: Toflar
Created: 2011-11-29 21:52:37+00:00
State: open
Labels: Accepted, Defect, framework

Hi Leo

Just had the problem that I couldn't download files from Contao.
Whenever I wanted to download a file it downloaded file for about 80% of the file and then it just didn't finish - endless download ;)
I've never had this problem so far so I was quite puzzled.

While analyzing the problem I realized that the file size and the Content-Length header were matching but I received 1 byte more than the actual file size.
So somehow this stupid windows server must have added another byte (a CRLF or whatever).

Apparently, due to the server config, the server wanted to keep the connection alive and closing it manually has solved the problem for me.

Problem was definitely due to the server config. It didn't work in FF, nor in Chrome or IE.
With the patch implemented, everything worked fine.

And it is also not related to the buffering problem #2678 because this fix was already in place ;-)

[Download the attachments](http://www.contao.org/tl_files/tickets/3602.zip "Download the attachments of this ticket")

--- _Originally created on November 4th, 2011, at 04:17pm (ID 3602)_