Commit ab3101e5 authored by Kirill Smelkov's avatar Kirill Smelkov

DataArray: Add a note a lot of code is currently duplicated from ERP5's BigFile

4dfcdc5f (DataArray: get array slice by HTTP Range Request) added HTTP
range support for DataArray by way of copying code from ERP5's BigFile
implementation.

It is better to not copy the code and just use the base class and hook
into it in a proper way (I think it is possible to do even without
mixin).

Add a proper FIXME/TODO so we do not forget to fix it one day.

/reviewed-by @Tyagov
/cc @klaus
parent b1589abf
......@@ -106,6 +106,8 @@ class DataArray(BigFile):
return ''
# FIXME this duplicates a lot of code from ERP5's BigFile
# -> TODO reuse BigFile streaming capability without copying its code
def _range_request_handler(self, REQUEST, RESPONSE):
RESPONSE.setHeader("Content-Type", "application/octet-stream")
# HTTP Range header handling: return True if we've served a range
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment