Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Matevz Golob
wendelin
Commits
c2481a75
Commit
c2481a75
authored
Jul 15, 2015
by
Klaus Wölfel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DataArray: content type response header
parent
4dfcdc5f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
bt5/erp5_wendelin/DocumentTemplateItem/portal_components/document.erp5.DataArray.py
...TemplateItem/portal_components/document.erp5.DataArray.py
+8
-9
No files found.
bt5/erp5_wendelin/DocumentTemplateItem/portal_components/document.erp5.DataArray.py
View file @
c2481a75
...
@@ -104,10 +104,10 @@ class DataArray(BigFile):
...
@@ -104,10 +104,10 @@ class DataArray(BigFile):
# we served a chunk of content in response to a range request.
# we served a chunk of content in response to a range request.
return
''
return
''
# XXX: what we do? We can not transmit entire Big Array?
return
''
return
''
def
_range_request_handler
(
self
,
REQUEST
,
RESPONSE
):
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
# HTTP Range header handling: return True if we've served a range
# chunk out of our data.
# chunk out of our data.
range
=
REQUEST
.
get_header
(
'Range'
,
None
)
range
=
REQUEST
.
get_header
(
'Range'
,
None
)
...
@@ -183,7 +183,6 @@ class DataArray(BigFile):
...
@@ -183,7 +183,6 @@ class DataArray(BigFile):
'bytes %d-%d/%d'
%
(
start
,
end
-
1
,
self
.
getSize
()))
'bytes %d-%d/%d'
%
(
start
,
end
-
1
,
self
.
getSize
()))
RESPONSE
.
setStatus
(
206
)
# Partial content
RESPONSE
.
setStatus
(
206
)
# Partial content
self
.
log
(
data
[
start
:
end
].
tobytes
())
RESPONSE
.
write
(
data
[
start
:
end
].
tobytes
())
RESPONSE
.
write
(
data
[
start
:
end
].
tobytes
())
else
:
else
:
boundary
=
choose_boundary
()
boundary
=
choose_boundary
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment