Changeset 15741 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/HttpClient.java
r15423 r15741 64 64 private final Map<String, String> headers = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); 65 65 private int maxRedirects = Config.getPref().getInt("socket.maxredirects", 5); 66 private boolean useCache ;66 private boolean useCache = true; 67 67 private String reasonForRequest; 68 68 private String outputMessage = tr("Uploading data ..."); … … 614 614 615 615 /** 616 * Determines whether not to set header {@code Cache-Control=no-cache} 616 * Determines whether not to set header {@code Cache-Control=no-cache}. 617 * By default, {@code useCache} is true, i.e., the header {@code Cache-Control=no-cache} is not sent. 618 * 617 619 * @return whether not to set header {@code Cache-Control=no-cache} 618 620 * @since 15229 … … 657 659 658 660 /** 659 * Sets whether not to set header {@code Cache-Control=no-cache} 661 * Sets whether not to set header {@code Cache-Control=no-cache}. 662 * By default, {@code useCache} is true, i.e., the header {@code Cache-Control=no-cache} is not sent. 660 663 * 661 664 * @param useCache whether not to set header {@code Cache-Control=no-cache} -
trunk/test/functional/org/openstreetmap/josm/tools/HttpClientTest.java
r14191 r15741 117 117 assertThat(root.getJsonObject("args").getString("foo"), is("bar")); 118 118 assertThat(root.getString("url"), is("https://httpbin.org/get?foo=bar")); 119 assertThat(root.getJsonObject("headers").get("Cache-Control"), nullValue()); 120 assertThat(root.getJsonObject("headers").get("Pragma"), nullValue()); 119 121 } 120 122 }
Note:
See TracChangeset
for help on using the changeset viewer.