def set_paging(self):
        # Receiving the following header:
        # Range: items=0-24
        # Returning: Content-Range: items 0-24/66
        if 'RANGE' in self.META:
            regexp = re.compile(r"^\s*items=(\d+)-(\d+)", re.I)
            match = regexp.match(self.META['RANGE'])
            if match:
                start, end = match.groups()
                start, end = int(start), int(end)+1 # range-end means including that element!
                self.start = start
                count = self.max_count
                if end-start < self.max_count:
                    count = end-start
                self.end = start+count
dataset/ETHPy150Open klipstein/dojango/dojango/data/__init__.py/JsonRestStoreInfo.set_paging/original