[tor-commits] [check/master] Add Last-Modified header to bulk exit list.

arlo at torproject.org arlo at torproject.org
Thu Oct 10 17:45:15 UTC 2013


commit e76ca136419cf7802ac172221dc80fd765ea1ba7
Author: Arlo Breault <arlolra at gmail.com>
Date:   Thu Oct 10 10:43:25 2013 -0700

    Add Last-Modified header to bulk exit list.
---
 handlers.go |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/handlers.go b/handlers.go
index cd8e815..3a91087 100644
--- a/handlers.go
+++ b/handlers.go
@@ -117,6 +117,8 @@ func BulkHandler(Layout *template.Template, Exits *Exits, domain *gettext.Domain
 		port, port_str := GetQS(q, "port", 80)
 		n, n_str := GetQS(q, "n", 16)
 
+		w.Header().Set("Last-Modified", Exits.UpdateTime.UTC().Format(http.TimeFormat))
+
 		str := fmt.Sprintf("# This is a list of all Tor exit nodes from the past %d hours that can contact %s on port %d #\n", n, ip, port)
 		str += fmt.Sprintf("# You can update this list by visiting https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=%s%s%s #\n", ip, port_str, n_str)
 		str += fmt.Sprintf("# This file was generated on %v #\n", Exits.UpdateTime.UTC().Format(time.UnixDate))



More information about the tor-commits mailing list