Remove headers for legacy purging
authorMagnus Hagander <magnus@hagander.net>
Thu, 20 Jun 2019 08:42:16 +0000 (10:42 +0200)
committerMagnus Hagander <magnus@hagander.net>
Thu, 20 Jun 2019 08:42:16 +0000 (10:42 +0200)
Now that we use xkey for purging, no need to keep the old headers
around.

django/archives/mailarchives/api.py
django/archives/mailarchives/views.py

index 0b5021de030de33f4951cb2b9dd235e75a8c721a..1409576423ef7fa01f64572c502918248159e20c 100644 (file)
@@ -85,7 +85,6 @@ def latest(request, listname):
     # up in this month.
     # XXX: need to deal with the global view, but for now API callers come in directly
     if list:
-        resp['X-pglm'] = ':%s:' % (':'.join(['%s/%s/%s' % (list.listid, year, month) for year, month in allyearmonths]))
         resp['xkey'] = ' '.join(['pgam_{0}/{1}/{2}'.format(l.listid, year, month) for year, month in allyearmonths])
     return resp
 
@@ -113,7 +112,6 @@ def thread(request, msgid):
             'atts': [{'id': a.id, 'name': a.filename} for a in m.attachment_set.all()],
         }
         for m in mlist], resp)
-    resp['X-pgthread'] = msg.threadid
     resp['xkey'] = 'pgat_{0}'.format(msg.threadid)
     return resp
 
index 4835e7e8b3f503351f09a7401a74a5552a3d508f..ce5a304087c5c157ca9be088e8859396c55e0d04 100644 (file)
@@ -285,7 +285,6 @@ def _render_datelist(request, l, d, datefilter, title, queryproc):
         'daysinmonth': daysinmonth,
         'yearmonth': yearmonth,
     })
-    r['X-pglm'] = ':%s:' % (':'.join(['%s/%s/%s' % (l.listid, year, month) for year, month in allyearmonths]))
     r['xkey'] = ' '.join(['pgam_{0}/{1}/{2}'.format(l.listid, year, month) for year, month in allyearmonths])
     return r
 
@@ -491,7 +490,6 @@ def message(request, msgid):
         'lists': lists,
         'nextprev': nextprev,
     })
-    r['X-pgthread'] = ":%s:" % m.threadid
     r['xkey'] = 'pgat_{0}'.format(m.threadid)
     r['Last-Modified'] = http_date(newest)
     return r
@@ -522,7 +520,6 @@ def message_flat(request, msgid):
         'lists': lists,
         'isfirst': isfirst,
     })
-    r['X-pgthread'] = ":%s:" % msg.threadid
     r['xkey'] = 'pgat_{0}'.format(msg.threadid)
     r['Last-Modified'] = http_date(newest)
     return r
@@ -545,7 +542,6 @@ def message_raw(request, msgid):
         r = HttpResponse('This message has been hidden.', content_type='text/plain')
     else:
         r = HttpResponse(row[0][2], content_type='text/plain')
-        r['X-pgthread'] = ":%s:" % row[0][0]
         r['xkey'] = 'pgat_{0}'.format(row[0][0])
     return r