summaryrefslogtreecommitdiffstats
path: root/lib/libfetch/fetch.3
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libfetch/fetch.3')
-rw-r--r--lib/libfetch/fetch.325
1 files changed, 24 insertions, 1 deletions
diff --git a/lib/libfetch/fetch.3 b/lib/libfetch/fetch.3
index 81b7164..9b312b0 100644
--- a/lib/libfetch/fetch.3
+++ b/lib/libfetch/fetch.3
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd December 18, 2007
+.Dd December 14, 2008
.Dt FETCH 3
.Os
.Sh NAME
@@ -165,9 +165,16 @@ struct url {
char *doc;
off_t offset;
size_t length;
+ time_t ims_time;
};
.Ed
.Pp
+The
+.Va ims_time
+field stores the time value for
+.Li If-Modified-Since
+HTTP requests.
+.Pp
The pointer returned by
.Fn fetchMakeURL
or
@@ -353,6 +360,22 @@ and
.Fn fetchPutHTTP
will use a direct connection even if a proxy server is defined.
.Pp
+If the
+.Ql i
+(if-modified-since) flag is specified, and
+the
+.Va ims_time
+field is set in
+.Vt "struct url" ,
+then
+.Fn fetchXGetHTTP
+and
+.Fn fetchGetHTTP
+will send a conditional
+.Li If-Modified-Since
+HTTP header to only fetch the content if it is newer than
+.Va ims_time .
+.Pp
Since there seems to be no good way of implementing the HTTP PUT
method in a manner consistent with the rest of the
.Nm fetch
OpenPOWER on IntegriCloud