Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
bae8e249
Commit
bae8e249
authored
Aug 04, 2003
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor cleanup
parent
1f20a939
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
lib/python/App/ImageFile.py
lib/python/App/ImageFile.py
+3
-8
No files found.
lib/python/App/ImageFile.py
View file @
bae8e249
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
##############################################################################
##############################################################################
"""Image object that is stored in a file"""
"""Image object that is stored in a file"""
__version__
=
'$Revision: 1.
19
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
20
$'
[
11
:
-
2
]
import
os
import
os
import
time
import
time
...
@@ -43,9 +43,7 @@ class ImageFile(Acquisition.Explicit):
...
@@ -43,9 +43,7 @@ class ImageFile(Acquisition.Explicit):
max_age
=
3600
# One hour
max_age
=
3600
# One hour
self
.
cch
=
'public,max-age=%d'
%
max_age
self
.
cch
=
'public,max-age=%d'
%
max_age
file
=
open
(
path
,
'rb'
)
data
=
open
(
path
,
'rb'
).
read
()
data
=
file
.
read
()
file
.
close
()
content_type
,
enc
=
guess_content_type
(
path
,
data
)
content_type
,
enc
=
guess_content_type
(
path
,
data
)
if
content_type
:
if
content_type
:
self
.
content_type
=
content_type
self
.
content_type
=
content_type
...
@@ -84,10 +82,7 @@ class ImageFile(Acquisition.Explicit):
...
@@ -84,10 +82,7 @@ class ImageFile(Acquisition.Explicit):
RESPONSE
.
setStatus
(
304
)
RESPONSE
.
setStatus
(
304
)
return
''
return
''
f
=
open
(
self
.
path
,
'rb'
)
return
open
(
self
.
path
,
'rb'
).
read
()
data
=
f
.
read
()
f
.
close
()
return
data
HEAD__roles__
=
None
HEAD__roles__
=
None
def
HEAD
(
self
,
REQUEST
,
RESPONSE
):
def
HEAD
(
self
,
REQUEST
,
RESPONSE
):
...
...
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