* Re: Automatic insertion of expires header
[not found] <3234708948906645@oakhurst.yi.org>
@ 2002-07-03 20:27 ` Josh Huber
0 siblings, 0 replies; only message in thread
From: Josh Huber @ 2002-07-03 20:27 UTC (permalink / raw)
Thomas Skogestad <tskogest@jusstud.uio.no> writes:
> I would like to have Gnus insert an "Expires" header. I would like
> to use posting styles so that this can be on a per group basis. But
> how?
How about...
(defun make-expires-date (days)
(let* ((cur (decode-time (current-time)))
(nday (+ days (nth 3 cur))))
(setf (nth 3 cur) nday)
(time-stamp-strftime "%a, %d %b %Y %H:%M:%S %Z"
(apply 'encode-time cur))))
And, inside posting styles:
(setq gnus-posting-styles
'((".*"
("Expires" (make-expires-date 30)))
("other.group"
("Expires" (make-expires-date 10)))))
Something like that? I didn't try it, but it may do what you want :)
You might want to change the format of the date. That format is the
standard required for HTTP expires headers, and I didn't even know
about the NNTP expires header until now...
have a nice day,
--
Josh Huber
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-07-03 20:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <3234708948906645@oakhurst.yi.org>
2002-07-03 20:27 ` Automatic insertion of expires header Josh Huber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).