Skip to content

Commit d1dc484

Browse files
authored
Merge pull request #49 from thc202/disable-http-cache
Explicitly disable HTTP cache in ClientApi
2 parents 9481cd7 + e27ca12 commit d1dc484

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ Summary of the changes done in each version.
44

55
## 1.6.0 (Not yet released)
66

7+
### Changes
8+
9+
- Explicitly disable HTTP caching, to always obtain a fresh response from ZAP.
710

811
## 1.5.0 (2017-11-30)
912

subprojects/zap-clientapi/src/main/java/org/zaproxy/clientapi/core/ClientApi.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ private Document callApiDom(
351351

352352
private InputStream getConnectionInputStream(HttpRequest request) throws IOException {
353353
HttpURLConnection uc = (HttpURLConnection) request.getRequestUri().openConnection(proxy);
354+
uc.setUseCaches(false);
354355
for (Entry<String, String> header : request.getHeaders().entrySet()) {
355356
uc.setRequestProperty(header.getKey(), header.getValue());
356357
}

0 commit comments

Comments
 (0)