summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/file_proxy.php
AgeCommit message (Collapse)Author
2010-08-11Send back the content length of files. This fixes streaming movies. Fixes ↵Bharat Mediratta
ticket #974.
2010-08-09"Content-type" --> "Content-Type".Bharat Mediratta
2010-07-31Use readfile() instead of fopen()/fpassthru()/fclose() for brevity.Bharat Mediratta
I've done some tests on a 60M flv and found that there's no difference in memory consumption with these three approaches: public function test() { Kohana::close_buffers(false); $file = "/home/bharat/basketball.flv"; if ($fd = fopen($file, "rb")) { while (true) { $bits = fread($fd, 65535); if (strlen($bits) == 0) { break; } print $bits; set_time_limit(30); } fclose($fd); } Kohana_Log::add("error","test: " . print_r(array(memory_get_peak_usage(true),memory_get_peak_usage(false)),1)); } public function test2() { Kohana::close_buffers(false); $file = "/home/bharat/basketball.flv"; $fd = fopen($file, "rb"); fpassthru($fd); fclose($fd); Kohana_Log::add("error","test2: " . print_r(array(memory_get_peak_usage(true),memory_get_peak_usage(false)),1)); } public function test3() { Kohana::close_buffers(false); $file = "/home/bharat/basketball.flv"; readfile($file); Kohana_Log::add("error","test3: " . print_r(array(memory_get_peak_usage(true),memory_get_peak_usage(false)),1)); }
2010-07-10Accept extension .m4v as video/mp4Romain LE DISEZ
2010-06-17Fix for ticket #1110. Need to use the encode_path with a movie extension to ↵Tim Almdal
find the item. Thanks to samdavidoff for the initial fix.
2010-03-03Update the copyright to 2010. It's only 3 months into the year :-)Bharat Mediratta
2010-01-31Fix lots of warnings that pop up when we're in E_STRICT mode. They'reBharat Mediratta
mostly issues around uninitialized variables, calling non-static functions in a static context, calling Session functions directly instead of on its singleton, passing non-variables by reference, and subclasses not using the same interface as the parent class.
2010-01-08Change file proxy to url encode the path components instead of the entire ↵Tim Almdal
path. Otherwise, we will encode the slashes and won't find the item.
2010-01-07Use rawurlencode to remove any encoding that the browser may have added. ↵Tim Almdal
Fixes ticket #954.
2010-01-04Send an empty Pragma header and use the item-updated time in the ↵Tim Almdal
last-modified header
2009-12-30Change the file proxy to use the expires helper to manage content ↵Tim Almdal
expiration. Fixes ticket #953.
2009-12-23Convert a bunch of leftover kohana::show_404 calls to throwBharat Mediratta
Kohana_404_Exception instead. These are the ones where we used a lower-case 'k' so my previous filter didn't catch it.
2009-12-21Updates for the latest version of Kohana 2.4:Bharat Mediratta
1) Controller::$input is gone -- use Input::instance() now 2) Handle new 'database.<default>.connection.params' parameter 3) Handle new 'cache.<default>.prefix' parameter
2009-12-01Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_devBharat Mediratta
2009-12-01Beter fix for #925.Bharat Mediratta
2009-12-01Use the real mime type for movies when we're requesting the full movieBharat Mediratta
instead of a thumbnail. Fixes ticket #925, thanks to lsowen.
2009-11-26Convert all DB where() calls to take 3 arguments.Bharat Mediratta
Convert all open_paren() calls to and_open() or or_open() as appropriate.
2009-11-25Preliminary work to cut over to Kohana 2.4Bharat Mediratta
- Kohana::log() -> Kohana_Log::add() - Kohana::config_XXX -> Kohana_Config::instance()->XXX - Implement View::set_global in MY_View - Updated Cache_Database_Driver to latest APIs - ORM::$loaded -> ORM::loaded() - Updated item::viewable() to use K2.4 parenthesization
2009-10-27Refix #812, by removing the decoding in file_proxy instead of not encoding ↵Tim Almdal
in Item_Model when creating the relative_path_cache.
2009-08-20Fix the setting of the mime type header. as perTim Almdal
http://gallery.menalto.com/node/90306 Thanks rWatcher Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-07-21Properly display thumbnails for private movies by backtracking fromBharat Mediratta
the thumbnail to the movie and then showing it as a JPG. Fixes ticket #570.
2009-07-21Remove the fallback code. It should trigger extremely rarely and seems ↵Bharat Mediratta
highly inefficient to me, so let's see if we can live without it.
2009-07-12Use %27 instead of &#039; (the latter is the wrong form of escaping for urls).Bharat Mediratta
2009-07-11Unescape &#039; also (single quote)Bharat Mediratta
2009-06-30Re-add Session::abort_save(). It was reverted as part of the earlierBharat Mediratta
change, but this is the part that we want to keep.
2009-06-30Revert "Add Session::abort_save() to Kohana."Bharat Mediratta
Obsoleted by upstream fix. This reverts commit 06f066164f60fe0babbc7a480e6319a0702e0c46.
2009-06-21Add Session::abort_save() to Kohana.Bharat Mediratta
Filed upstream as: http://dev.kohanaphp.com/issues/1801
2009-06-01Unescape %20 into " " also.Bharat Mediratta
2009-05-31Remove extra blank lineBharat Mediratta
2009-06-01Convert %7E to ~ when proxying files to work around Firefox's overzealous ↵bharat
security model.
2009-05-29Use the relative_path_cache to look up items which should be a fasterBharat Mediratta
query than using the level + the components.
2009-05-27Restructure things so that the application is now just another module.Bharat Mediratta
Kohana makes this type of transition fairly straightforward in that all controllers/helpers/etc are still located in the cascading filesystem without any extra effort, except that I've temporarily added a hack to force modules/gallery into the module path. Rename what's left of "core" to be "application" so that it conforms more closely to the Kohana standard (basically, just application/config/config.php which is the minimal thing that you need in the application directory) There's still considerable work left to be done here.