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
Labels
Merge Requests
18
Merge Requests
18
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
362a0b60
Commit
362a0b60
authored
Oct 09, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fine tune response.
parent
6d31793b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
master/product/Vifib/Tool/SlapTool.py
master/product/Vifib/Tool/SlapTool.py
+9
-6
No files found.
master/product/Vifib/Tool/SlapTool.py
View file @
362a0b60
...
...
@@ -257,12 +257,13 @@ class SlapTool(BaseTool):
# result = self._getComputerInformation(computer_id, user, False)
result
=
self
.
_getComputerInformation
(
computer_id
,
user
,
False
)
# Keep in cache server for
1 year
# Keep in cache server for
7 days
self
.
REQUEST
.
response
.
setStatus
(
200
)
self
.
REQUEST
.
response
.
setHeader
(
'Cache-Control'
,
'
max-age=60, stale-if-error=315360
00'
)
'
public, max-age=60, stale-if-error=6048
00'
)
self
.
REQUEST
.
response
.
setHeader
(
'Vary'
,
'REMOTE_USER'
)
self
.
REQUEST
.
response
.
setHeader
(
'Last-Modified'
,
rfc1123_date
(
DateTime
()))
self
.
REQUEST
.
response
.
setBody
(
result
)
return
self
.
REQUEST
.
response
...
...
@@ -286,12 +287,13 @@ class SlapTool(BaseTool):
# return self._getComputerInformation(computer_id, user, True)
result
=
self
.
_getComputerInformation
(
computer_id
,
user
,
True
)
# Keep in cache server for
1 year
# Keep in cache server for
7 days
self
.
REQUEST
.
response
.
setStatus
(
200
)
self
.
REQUEST
.
response
.
setHeader
(
'Cache-Control'
,
'
max-age=60, stale-if-error=315360
00'
)
'
public, max-age=60, stale-if-error=6048
00'
)
self
.
REQUEST
.
response
.
setHeader
(
'Vary'
,
'REMOTE_USER'
)
self
.
REQUEST
.
response
.
setHeader
(
'Last-Modified'
,
rfc1123_date
(
DateTime
()))
self
.
REQUEST
.
response
.
setBody
(
result
)
return
self
.
REQUEST
.
response
...
...
@@ -600,12 +602,13 @@ class SlapTool(BaseTool):
slap_partition
.
_parameter_dict
.
update
(
parameter_dict
)
result
=
xml_marshaller
.
xml_marshaller
.
dumps
(
slap_partition
)
# Keep in cache server for
1 year
# Keep in cache server for
7 days
self
.
REQUEST
.
response
.
setStatus
(
200
)
self
.
REQUEST
.
response
.
setHeader
(
'Cache-Control'
,
'
max-age=60, stale-if-error=315360
00'
)
'
public, max-age=60, stale-if-error=6048
00'
)
self
.
REQUEST
.
response
.
setHeader
(
'Vary'
,
'REMOTE_USER'
)
self
.
REQUEST
.
response
.
setHeader
(
'Last-Modified'
,
rfc1123_date
(
DateTime
()))
self
.
REQUEST
.
response
.
setBody
(
result
)
return
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