def render_GET(self, request):

        if self.representation is None:
            # we haven't been given a representation yet
            request.setResponseCode(500)
            return 'Resource has not yet been created/updated.'

        # check for if-modified-since header, and send 304 back if it is not been modified
        msd_header = request.getHeader(IF_MODIFIED_SINCE)
        if msd_header:
            try:
                msd = datetime.datetime.strptime(msd_header, RFC850_FORMAT)
                if msd >= self.last_update_time:
                    request.setResponseCode(304)
                    return ''
            except __HOLE__:
                pass # error parsing timestamp

        request.setHeader(LAST_MODIFIED, self.last_modified_timestamp)
        if self.mime_type:
            request.setHeader(CONTENT_TYPE, self.mime_type)

        return self.representation
dataset/ETHPy150Open NORDUnet/opennsa/opennsa/shared/modifiableresource.py/ModifiableResource.render_GET