Nir Soffer has posted comments on this change. Change subject: core: GET requests - use Range header ......................................................................
Patch Set 7: (2 comments) http://gerrit.ovirt.org/#/c/28465/7/vdsm/BindingXMLRPC.py File vdsm/BindingXMLRPC.py: Line 265: def _getLength(self): Line 266: value = self._getRequiredHeader(self.HEADER_RANGE, Line 267: httplib.BAD_REQUEST) Line 268: Line 269: m = re.match('r^bytes=(\d*)-(\d+)$', value) This should be: r'^bytes=(\d*)-(\d+)$' Line 270: if m is None: Line 271: raise self.RequestException( Line 272: httplib.BAD_REQUEST, Line 273: "range in an unsupported format: %r", value) Line 279: "range first byte position other than 0 isn't " Line 280: "supported") Line 281: Line 282: last_byte = m.group(2) Line 283: if last_byte == '': This is not possible with your regex - please read again the comments in the previous patch. This string "-" will not match your pattern and you will fail on line 270 with a generic error. If you like to have an error for empty last_byte, use (\d*) - 0 or more digits. But I think all this error handling and different errors is a waste of everyone time. We should invest our time in more important feature instead. The developer trying to integrate with us needs simple documentation: We support any range between 0-N, we don't support empty last byte. We don't need to provide online help by using the api. Line 284: raise self.RequestException( Line 285: httplib.BAD_REQUEST, Line 286: "unspecified range last byte position isn't supported") Line 287: -- To view, visit http://gerrit.ovirt.org/28465 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8164867347b1cf800efd2a78cc98dbc10c02ee0d Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Liron Aravot <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Federico Simoncelli <[email protected]> Gerrit-Reviewer: Liron Aravot <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
