summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/file_proxy.php
AgeCommit message (Collapse)Author
2013-01-24If profiling is enabled, dump out profiling data instead of proxiedBharat Mediratta
images so that we can see how efficient our proxying is. Follow-on for #1959.
2013-01-21#1954 - Skip buffer calls for unit tests of file_proxy and data_rest.shadlaws
Moved the "if (TEST_MODE)" statement before the buffer calls in file_proxy and data_rest. This has no impact on normal use, but will make the unit tests more compatible with different server/PHP configurations. Note: We do not have to skip setting the headers, which means we can build unit tests around them if we wish.
2013-01-21Update copyright to 2013. Fixes #1953.Bharat Mediratta
2013-01-20Add a long overdue test for File_Proxy_Controller that tests all the variousBharat Mediratta
edge case behaviors. It doesn't cover the various headers, but it does cover the permission based code paths.
2013-01-20#1949 - Fix album thumb mime types given by data_rest and file_proxyshadlaws
Correct result: always "image/jpeg" Old data_rest result: mime of cover item Old file_proxy result: mime of album item (null)
2013-01-19#1942 - Make data_rest and file_proxy more consistent - several minor ↵shadlaws
documentation/formatting changes. No actual functionality changed here.
2012-12-10bug fix: updated file_proxy.php to use legal_file helper instead of ↵shadlaws
hard-coded list of movie file extensions. bug fix: updated uploader.php to use legal_file helper instead of hard-coded list of movie file extensions. Fixes #1926
2012-06-05Fix up syntax in the last change. Follow-on for #1879.Bharat Mediratta
2012-06-05Force Turn off the compress as most image file already compressed.Tony Fung
2012-06-04Second attempt to fix #1821 - first attempt caused an infinite loop in some ↵Bharat Mediratta
cases when zlib.output_compression is enabled.
2012-05-08Close all buffers, not just the ones that Kohana opened. Fixes #1821,Bharat Mediratta
thanks to pvalsecc.
2012-02-27Update copyright to 2012. #1822Bharat Mediratta
2011-01-21Update copyright to 2011.Bharat Mediratta
2011-01-11Update comments to annotate what data is where during the process.Bharat Mediratta
Follow-on for #1518.
2011-01-11Merge branch 'Ticket#1518' of git://github.com/Joe7/gallery3Bharat Mediratta
2011-01-11Removed check as input value is compared against dataset of validated ↵Joe7
values, and request is only processed further in case of a match. => this is unnecessary
2011-01-10Allow File_Proxy_Controller to run in private gallery mode since itBharat Mediratta
does all the right permission checks. This prevents a hotlink to a private photo in a private gallery from kicking the user out to a login page. Fixes #1594.
2011-01-07Allow '..' segment in photo/album paths through file_proxy (as is not ↵Joe7
forbidden in other places like add album/item) and explitely look for /../ instead Note: directory path can't end in '.' forcibly so this shall be fine Fixes Ticket #1518
2010-12-21Updated to use the new item::find_by_path() API.Bharat Mediratta
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.