@Singleton @Named(value="x-checksum") public class XChecksumChecksumExtractor extends ChecksumExtractor
x-
non-standard style checksums from response headers.
Tried headers (in order):
x-checksum-sha1
- Maven Central and other CDNsx-checksum-md5
- Maven Central and other CDNsx-goog-meta-checksum-sha1
- GCSx-goog-meta-checksum-md5
- GCSModifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
Constructor and Description |
---|
XChecksumChecksumExtractor() |
Modifier and Type | Method and Description |
---|---|
private java.lang.String |
extractChecksum(org.apache.http.HttpResponse response,
java.lang.String name) |
java.util.Map<java.lang.String,java.lang.String> |
extractChecksums(org.apache.http.HttpResponse response)
Tries to extract checksums from response headers, if present, otherwise returns
null . |
prepareRequest, retryWithoutExtractor
public static final java.lang.String NAME
public java.util.Map<java.lang.String,java.lang.String> extractChecksums(org.apache.http.HttpResponse response)
ChecksumExtractor
null
.extractChecksums
in class ChecksumExtractor
private java.lang.String extractChecksum(org.apache.http.HttpResponse response, java.lang.String name)