Skip to content

Commit ab5b3b0

Browse files
author
Sergey Alifanov
committed
Don't cache HEAD responses (fixes djc#120).
1 parent 987a59e commit ab5b3b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

couchdb/http.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def _retry():
288288
raise ServerError((status, error))
289289

290290
# Store cachable responses
291-
if not streamed and method in ('GET', 'HEAD') and 'etag' in resp.msg:
291+
if not streamed and method == 'GET' and 'etag' in resp.msg:
292292
self.cache[url] = (status, resp.msg, data)
293293
if len(self.cache) > CACHE_SIZE[1]:
294294
self._clean_cache()

0 commit comments

Comments
 (0)