Project

General

Profile

Actions

Bug #41718

closed

improve (jumpurl) download of large files

Added by till busch about 12 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2012-10-08
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

when downloading large files (using jumpurl) php dies:

Fatal error: Allowed memory size of 100663296 bytes exhausted (tried to allocate 266393601 bytes) in typo3/sysext/cms/tslib/class.tslib_fe.php on line 2652

this can be improved by adding ob_end_flush() before readfile() in class.tslib_fe.php.

additionally i propose adding a Content-Length header (see the diff).


Files

jumpurl.diff (652 Bytes) jumpurl.diff till busch, 2012-10-08 14:52
Actions #1

Updated by Steffen Gebert about 12 years ago

Sounds reasonable, Till.

We have a function t3lib_div::flushOutputBuffers() (in 4.x) / TYPO3\CMS\Core\Utility\GeneralUtility in (6.0) to flush output buffers.

It would be great, if you could push your patch with that correction into the review workflow. See http://wiki.typo3.org/Contribution_Walkthrough_Tutorials and ask here in the mailing lists, if you have any questions!

Yours
Steffen

Actions #2

Updated by Gerrit Code Review about 12 years ago

  • Status changed from New to Under Review

Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/15507

Actions #3

Updated by Gerrit Code Review about 12 years ago

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/15508

Actions #4

Updated by Gerrit Code Review about 12 years ago

Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/15509

Actions #5

Updated by Gerrit Code Review about 12 years ago

Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/15510

Actions #6

Updated by Gerrit Code Review about 12 years ago

Patch set 1 for branch TYPO3_4-4 has been pushed to the review server.
It is available at http://review.typo3.org/15511

Actions #7

Updated by till busch about 12 years ago

i have tried to add the changes to gerrit. i'm not quite sure if what i did is good/conforms to standars:
  • one commit for each version i want to change
  • commits for 4.x series have the same Change-Id
  • i have not tested if jumpurl works with typo3 6.x after the change

also i'm not sure if stat() should be @stat()

Steffen Gebert wrote:

...
It would be great, if you could push your patch with that correction into the review workflow. See http://wiki.typo3.org/Contribution_Walkthrough_Tutorials and ask here in the mailing lists, if you have any questions!
...

Actions #8

Updated by Gerrit Code Review about 12 years ago

Patch set 2 for branch TYPO3_4-4 has been pushed to the review server.
It is available at http://review.typo3.org/15511

Actions #9

Updated by Gerrit Code Review about 12 years ago

Patch set 2 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/15507

Actions #10

Updated by Gerrit Code Review about 12 years ago

Patch set 2 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/15509

Actions #11

Updated by Gerrit Code Review about 12 years ago

Patch set 2 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/15510

Actions #12

Updated by Gerrit Code Review about 12 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/15508

Actions #13

Updated by Gerrit Code Review about 12 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/15508

Actions #14

Updated by Gerrit Code Review about 12 years ago

Patch set 3 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/15509

Actions #15

Updated by Gerrit Code Review about 12 years ago

Patch set 3 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/15510

Actions #16

Updated by Gerrit Code Review about 12 years ago

Patch set 3 for branch TYPO3_4-4 has been pushed to the review server.
It is available at http://review.typo3.org/15511

Actions #17

Updated by Gerrit Code Review about 12 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/15508

Actions #18

Updated by Steffen Gebert about 12 years ago

Thanks for pushing, Till!

Let's review it for master first and then we will take care of the other branches!

Actions #19

Updated by Gerrit Code Review about 12 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/15508

Actions #20

Updated by Gerrit Code Review about 12 years ago

Patch set 6 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/15508

Actions #21

Updated by Gerrit Code Review about 12 years ago

Patch set 3 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/15507

Actions #22

Updated by Gerrit Code Review about 12 years ago

Patch set 4 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/15509

Actions #23

Updated by Gerrit Code Review about 12 years ago

Patch set 4 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/15510

Actions #24

Updated by Alexander Opitz over 11 years ago

Hi Till,

can you please rebase your patch to latest master?

Actions #25

Updated by Gerrit Code Review over 11 years ago

Patch set 4 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/15507

Actions #26

Updated by Gerrit Code Review over 11 years ago

Patch set 7 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/15508

Actions #27

Updated by Gerrit Code Review over 11 years ago

Patch set 8 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/15508

Actions #28

Updated by Gerrit Code Review over 11 years ago

Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/21917

Actions #29

Updated by Gerrit Code Review over 11 years ago

Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/21918

Actions #30

Updated by till busch over 11 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #31

Updated by Nils Böcher about 11 years ago

Gerrit Code Review wrote:

Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/21917

After this update (TYPO3 6.1.4) the header "Content-Length" for every download file showed a size of 26 bytes, no matter how big the file was.
The calculation of the filesize seems to be not working correctly.

I deleted line 2854 in TypoScriptFrontendController.php (header('Content-Length: ' . filesize($absoluteFileName));) as quick workaround.

Actions #32

Updated by Alexander Opitz about 11 years ago

  • Is Regression set to No

@Nils Böcher

Please open a new issue for this. From reading the source it should work. Please write in this issue your PHP version which you use. And the complete response header to get this analyzed.

Thanks.

Actions #33

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF