[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
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