"http://download.freizeitkarte-osm.de/android/1404/freizeitkarte_berlin.map.zip", // Content-Type: application/zip
"http://download.mapsforge.org/maps/asia/azerbaijan.map",
"http://ftp5.gwdg.de/pub/misc/openstreetmap/openandromaps/maps/Germany/berlin.zip" // Content-Type: application/zip
};
for (String url : URLS) {
Head head200 = new Head(url);
head200.executeAsString();
assertTrue(head200.isOk());
assertTrue(head200.getAcceptByteRanges());
assertNotNull(head200.getETag());
assertNotNull(head200.getLastModified());
assertNotNull(head200.getContentLength());
System.out.println(url + ":\nHEAD 200: " + head200.getHeaders());
Head head304IfModifiedSince = new Head(url);
head304IfModifiedSince.setIfModifiedSince(head200.getLastModified());
head304IfModifiedSince.executeAsString();
assertTrue(head304IfModifiedSince.isNotModified());
assertFalse(head304IfModifiedSince.getAcceptByteRanges());
assertNotNull(head304IfModifiedSince.getETag());
assertNull(head304IfModifiedSince.getLastModified());
assertNull(head304IfModifiedSince.getContentLength());
System.out.println(head304IfModifiedSince.getHeaders());
Head head304Etag = new Head(url);
head304Etag.setIfNoneMatch(head200.getETag());
head304Etag.executeAsString();
assertTrue(head304Etag.isNotModified());
assertFalse(head304Etag.getAcceptByteRanges());
assertNotNull(head304Etag.getETag());
assertNull(head304Etag.getLastModified());
assertNull(head304Etag.getContentLength());
System.out.println(head304Etag.getHeaders());
Get get200 = new Get(url);
get200.executeAsString();
assertTrue(get200.isOk());
assertTrue(get200.getAcceptByteRanges());