Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

Commit

Permalink
Merge pull request #385 from dotcloud/fix-#382
Browse files Browse the repository at this point in the history
Fix #382
  • Loading branch information
dmp42 committed May 23, 2014
2 parents 6a6a3e1 + 3eea62a commit 3858749
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docker_registry/toolkit.py
Expand Up @@ -82,12 +82,15 @@ def response(data=None, code=200, headers=None, raw=False):
data = True
h = {
'Cache-Control': 'no-cache',
'Pragma': 'no-cache',
'Expires': '-1',
'Content-Type': 'application/json'
}
if headers:
h.update(headers)

if h['Cache-Control'] == 'no-cache':
h['Pragma'] = 'no-cache'

try:
if raw is False:
data = json.dumps(data, sort_keys=True, skipkeys=True)
Expand Down

0 comments on commit 3858749

Please sign in to comment.