Cache images from starred articles

Request new functionality here
disconn3ct
Bear Rating Trainee
Bear Rating Trainee
Posts: 37
Joined: 12 Apr 2013, 15:07

Re: Cache images from starred articles

Postby disconn3ct » 04 Oct 2013, 17:35

FYI gzip is definitely breaking images for me. Just tested with and without, and I get broken images with it on and actual images with it off. (I know its a somewhat old thread, but I thought searching was more fun than posting a new thread..)

Both broken and working images show as 200 in the logs, with 0 size.

Client is OSX with Chrome 30.0.1599.69
Server is an Ubuntu cloud box (not shared!) with apache 2.2.22-6 using a proper ssl cert.

Poking around backend.php, it looks like the handler is set before the plugin is called. (Line 55, with - if I'm reading correctly - the plugin call around line 118:

Code: Select all

        if (ENABLE_GZIP_OUTPUT && function_exists("ob_gzhandler")) {
                ob_start("ob_gzhandler");
        }
...

Code: Select all

        $override = PluginHost::getInstance()->lookup_handler($op, $method);

        if (class_exists($op) || $override) {

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Cache images from starred articles

Postby fox » 04 Oct 2013, 18:46

Images are not served through backend.php though unless I'm missing something obvious.

Well obviously disable gzip if it doesn't work for you, but this is just strange.

disconn3ct
Bear Rating Trainee
Bear Rating Trainee
Posts: 37
Joined: 12 Apr 2013, 15:07

Re: Cache images from starred articles

Postby disconn3ct » 04 Oct 2013, 18:59

I got that from the url in the interface:

Code: Select all

https://mysite/ttrss/backend.php?op=pluginhandler&plugin=cache_starred_images&method=image&hash=1234-5678deadbeefetc

pga
Bear Rating Trainee
Bear Rating Trainee
Posts: 1
Joined: 05 Oct 2013, 05:54

Re: Cache images from starred articles

Postby pga » 05 Oct 2013, 06:06

Any chance to extend/fork this plugin to cache all images for all feeds?

This would be quite useful for tt-rss sites served with https, where embedding non https contents (i.e. images) triggers all sorts of warnings (for example, Firefox and Safari would no longer show the https padlock, Chrome shows a yellow warning symbol).

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Cache images from starred articles

Postby fox » 05 Oct 2013, 20:26

disconn3ct wrote:I got that from the url in the interface:

Code: Select all

https://mysite/ttrss/backend.php?op=pluginhandler&plugin=cache_starred_images&method=image&hash=1234-5678deadbeefetc


Ah right, those are not served with image.php. This makes sense.

e: wonder if this would help

https://github.com/gothfox/Tiny-Tiny-RS ... 376ef1bbf5

levito
Bear Rating Disaster
Bear Rating Disaster
Posts: 77
Joined: 17 Mar 2013, 04:18

Re: Cache images from starred articles

Postby levito » 05 Oct 2013, 21:15

Hi Fox, this works!

I had GZIP disabled to fix images. Now I enabled GZIP before pulling => broken images. Then I pulled => now the starred images show up fine with GZIP enabled.

Thanks a lot!

disconn3ct
Bear Rating Trainee
Bear Rating Trainee
Posts: 37
Joined: 12 Apr 2013, 15:07

Re: Cache images from starred articles

Postby disconn3ct » 06 Oct 2013, 19:11

Works great here too. Thanks!

nameless
Bear Rating Master
Bear Rating Master
Posts: 126
Joined: 28 Aug 2013, 20:33

Re: Cache images from starred articles

Postby nameless » 05 Feb 2014, 00:10

Is this still a problem?
I had gzip enabled which broke images for me. After disabling gzip previously stared images still don't seem to work.
Is my roblem gzip related or am i running into something differnt?


Return to “Feature requests”

Who is online

Users browsing this forum: No registered users and 4 guests