Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-file
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-file
Commits
99720eea
Commit
99720eea
authored
Sep 29, 2019
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change the .mtime() example to suggest setting the Last-Modified header.
parent
08b4fb35
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
14 deletions
+6
-14
README.rst
README.rst
+3
-7
vmod_file.vcc
src/vmod_file.vcc
+3
-7
No files found.
README.rst
View file @
99720eea
...
...
@@ -432,13 +432,9 @@ encountered an error.
Example::
import std;
# Log a message if the file has not been updated within the last
# day.
if (now - rdr.mtime() > 1d) {
std.log("file last updated at " + rdr.mtime());
}
# A VCL TIME is converted to a string as an HTTP date, and hence is
# suitable for the Last-Modified header.
set resp.http.Last-Modified = rdr.mtime();
.. _xreader.next_check():
...
...
src/vmod_file.vcc
View file @
99720eea
...
...
@@ -394,13 +394,9 @@ encountered an error.
Example::
import std;
# Log a message if the file has not been updated within the last
# day.
if (now - rdr.mtime() > 1d) {
std.log("file last updated at " + rdr.mtime());
}
# A VCL TIME is converted to a string as an HTTP date, and hence is
# suitable for the Last-Modified header.
set resp.http.Last-Modified = rdr.mtime();
$Method DURATION .next_check()
...
...
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