def close(self, error_code=None):
        # FIXME: I think this is overbroad, but for now it's probably ok.
        if not (self.remote_closed and self.local_closed):
            self._conn.reset_stream(self.stream_id, error_code or 0)
            self._send_cb(self._conn.data_to_send())
            self.remote_closed = True
            self.local_closed = True

        self._close_cb(self.stream_id)
Checks permissions and returns an HttpResponse with the path to the file
dataset/ETHPy150Open Lukasa/hyper/hyper/http20/stream.py/Stream.close--crossover with--dataset/ETHPy150Open lincolnloop/django-protected-files/protected_files/views.py/protected_file