def render_GET(self, request):
        msg = base64.urlsafe_b64decode(request.args["t"][0])
        tmppub, boxed0 = decrypt_list_request_1(msg)
        if tmppub in self.old_requests:
            request.setResponseCode(http.BAD_REQUEST, "Replay")
            return "Replay"
        ts, RT = decrypt_list_request_2(tmppub, boxed0, self.retrieval_privkey)
        now = time.time()
        if ts < now-self.CLOCK_WINDOW or ts > now+self.CLOCK_WINDOW:
            request.setResponseCode(http.BAD_REQUEST, "too much clock skew")
            return "Too much clock skew"
        try:
            tid, symkey = self.check_RT(RT)
        except __HOLE__:
            request.setResponseCode(http.NOT_FOUND, "no such RT")
            return "no such RT"
        # If check_RT() didn't throw KeyError, this is a new request, for a
        # known RT. It's worth preventing a replay.
        self.old_requests[tmppub] = ts

        all_messages = self.prepare_message_list(tid, symkey, tmppub)
        groups = [all_messages[i:i+self.MAX_MESSAGES_PER_ENTRY]
                  for i in range(0, len(all_messages),
                                 self.MAX_MESSAGES_PER_ENTRY)]
        entries = [" ".join([base64.b64encode(e) for e in group])
                   for group in groups]
        if ("text/event-stream" in (request.getHeader("accept") or "")
            and self.ENABLE_EVENTSOURCE):
            # EventSource protocol
            if tid in self.subscribers:
                # close the EventsProtocol when a new GET occurs (since
                # that will reset the tokens anyways)
                self.subscribers[tid][0].stop()
            request.setHeader("content-type", "text/event-stream")
            p = EventsProtocol(request)
            p.sendComment("beginning Message List event stream")
            for e in entries:
                p.sendEvent(e)
            self.subscribers[tid] = (p, symkey, tmppub)
            # unsubscribe when the EventsProtocol is closed
            def _done(_):
                if tid in self.subscribers and self.subscribers[tid][0] is p:
                    del self.subscribers[tid]
            request.notifyFinish().addErrback(_done)
            return server.NOT_DONE_YET
        for e in entries:
            request.write("data: %s\n\n" % e)
        return ""
dataset/ETHPy150Open warner/petmail/petmail/mailbox/server.py/RetrievalListResource.render_GET