Comparing version 2.3.2 to 2.3.3
@@ -84,4 +84,9 @@ "use strict"; | ||
}); | ||
if (previousResource && response.xhr.status === 304) { | ||
return previousResource; | ||
if (previousResource) { | ||
const etag = response.xhr.headers.get('etag'); | ||
const previousEtag = previousResource.response.xhr.headers.get('etag'); | ||
const etagsEqual = etag && etag === previousEtag; | ||
if (response.xhr.status === 304 || etagsEqual) { | ||
return previousResource; | ||
} | ||
} | ||
@@ -88,0 +93,0 @@ const stream = await response.quadStream(); |
# Changelog | ||
## 2.3.3 | ||
### Patch Changes | ||
- d1d2e9e: Previously retrieved resource representation will be used when response has equal `etag` header | ||
## 2.3.2 | ||
@@ -4,0 +10,0 @@ |
{ | ||
"name": "alcaeus", | ||
"version": "2.3.2", | ||
"version": "2.3.3", | ||
"description": "Hydra Core hypermedia-aware client library", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
395157
4814