Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
Titouan Soulard
slapos.core
Commits
8d572b87
Commit
8d572b87
authored
Jul 13, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify.
parent
4893d3ed
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
12 deletions
+5
-12
master/bt5/vifib_slapos_rest_api_v1/DocumentTemplateItem/portal_components/VifibRestAPIV1.py
.../DocumentTemplateItem/portal_components/VifibRestAPIV1.py
+4
-11
master/bt5/vifib_slapos_rest_api_v1/bt/revision
master/bt5/vifib_slapos_rest_api_v1/bt/revision
+1
-1
No files found.
master/bt5/vifib_slapos_rest_api_v1/DocumentTemplateItem/portal_components/VifibRestAPIV1.py
View file @
8d572b87
...
...
@@ -74,7 +74,7 @@ def requireHeader(header_dict):
return
wrapperRequireHeader
return
outer
def
supportModifiedSince
(
document_url_id
=
None
,
modified_property_id
=
None
):
def
supportModifiedSince
(
document_url_id
):
def
outer
(
fn
):
def
wrapperSupportModifiedSince
(
self
,
*
args
,
**
kwargs
):
modified_since
=
self
.
REQUEST
.
getHeader
(
'If-Modified-Since'
)
...
...
@@ -90,16 +90,9 @@ def supportModifiedSince(document_url_id=None, modified_property_id=None):
# client send date before current time, shall continue and
# compare with second precision, as client by default shall set
# If-Modified-Since to last known Last-Modified value
document
=
None
if
document_url_id
is
None
and
modified_property_id
is
None
:
document
=
self
elif
document_url_id
is
not
None
:
document
=
self
.
restrictedTraverse
(
getattr
(
self
,
document_url_id
))
else
:
document_date
=
getattr
(
self
,
modified_property_id
)
if
document
is
not
None
:
document_date
=
document
.
getModificationDate
()
or
\
document
.
bobobase_modification_time
()
document
=
self
.
restrictedTraverse
(
getattr
(
self
,
document_url_id
))
document_date
=
document
.
getModificationDate
()
or
\
document
.
bobobase_modification_time
()
if
int
(
document_date
.
timeTime
())
<=
int
(
modified_since
.
timeTime
()):
# document was not modified since
self
.
REQUEST
.
response
.
setStatus
(
304
)
...
...
master/bt5/vifib_slapos_rest_api_v1/bt/revision
View file @
8d572b87
14
\ No newline at end of file
15
\ No newline at end of file
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