Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
294
Merge Requests
294
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
5028d5fb
Commit
5028d5fb
authored
Aug 24, 2009
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#303419
by drewish: incorrect expiration headers with private file transfers.
parent
1d34a3e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
modules/image/image.module
modules/image/image.module
+7
-0
No files found.
modules/image/image.module
View file @
5028d5fb
...
...
@@ -203,8 +203,15 @@ function image_file_download($filepath) {
$headers
=
module_invoke_all
(
'file_download'
,
$original_path
);
if
(
!
in_array
(
-
1
,
$headers
))
{
return
array
(
// Send headers describing the image's size, and MIME-type...
'Content-Type'
=>
$info
[
'mime_type'
],
'Content-Length'
=>
$info
[
'file_size'
],
// ...and allow the file to be cached for two weeks (matching the
// value we use for the mod_expires settings in .htaccess) and
// ensure that caching proxies do not share the image with other
// users.
'Expires'
=>
gmdate
(
DATE_RFC1123
,
time
()
+
1209600
),
'Cache-Control'
=>
'max-age=1209600, private, must-revalidate'
,
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment