github: shadowy octopus with the head of a robot, emblazoned with the Dreamwidth swirl (Default)
github ([personal profile] github) wrote in [site community profile] changelog2017-02-21 08:19 pm

[dreamwidth/dw-free] 941441: [#1983] fix one more occurrence of reference misma...

Branch: refs/heads/release-1.32
Home: https://github.com/dreamwidth/dw-free
Commit: 941441147bd95f6b345d38c69eee4f6ddb958190
https://github.com/dreamwidth/dw-free/commit/941441147bd95f6b345d38c69eee4f6ddb958190
Author: Kareila <kareila@dreamwidth.org>
Date: 2017-02-21 (Tue, 21 Feb 2017)

Changed paths:
M cgi-bin/DW/Controller/EditIcons.pm

Log Message:
-----------
[#1983] fix one more occurrence of reference mismatch errors

Found 4 paths before; 5th path is obscure edge case where icon
is 100x100 or less, but file size is > $MAX_UPLOAD. I think
this edit removes the last direct references to $POST->{$userpic_key}
from parse_post_uploads. This is the error in the logs:

FATAL> BlobStore.pm:100 DW::BlobStore::store | Store requires data be a scalar reference. at /home/dw/production/cgi-bin/DW/Controller/EditIcons.pm line 215.


Commit: 8f7953dd1501b11c3db6f4a04f506e75b9916c18
https://github.com/dreamwidth/dw-free/commit/8f7953dd1501b11c3db6f4a04f506e75b9916c18
Author: Kareila <kareila@dreamwidth.org>
Date: 2017-02-21 (Tue, 21 Feb 2017)

Changed paths:
M cgi-bin/DW/Controller/API/Media.pm

Log Message:
-----------
[#1855] improve handling of media load errors on /file/edit

1. Early return if we have a 'null' or undef mediaid.

2. Eval call to DW::Media->new so we return an API error
instead of croaking if it failed.

Fixes #1855.


Commit: 861a018829ee0ae2c67b2a490413c44550976e08
https://github.com/dreamwidth/dw-free/commit/861a018829ee0ae2c67b2a490413c44550976e08
Author: Kareila <kareila@dreamwidth.org>
Date: 2017-02-21 (Tue, 21 Feb 2017)

Changed paths:
M cgi-bin/DW/Controller/Media.pm
M cgi-bin/DW/Routing.pm

Log Message:
-----------
additional headers for media file requests

Discussion with @alierak led to the conclusion that media files
should use the Cache-Control and Last-Modified headers.

Inspection of Apache/LiveJournal.pm and Apache/BML.pm indicates
that Cache-Control should be applied to all user content responses,
so we make that the new default behavior for user content in DW/Routing.pm.

The Last-Modified header is set in the media file controller as the
upload date of the file, which will never change.

Without the Last-Modified header, the image may be redownloaded
unnecessarily. Without the Cache-Control header, Cloudflare
caching may interfere with the ability to load the image correctly.


Compare: https://github.com/dreamwidth/dw-free/compare/e05fe1281a79...861a018829ee

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org