You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assert the coefficient checksum only when the server offers one
The flat /validation/download/ endpoint returns neither an ETag nor a
Content-Length, so no digest can be recorded from it. The divided archive
path does return the content MD5, but that path disappears at the July 2027
archive transition, and the beta archive returns neither header on any path
on files.wwpdb.org or files.rcsb.org.
So the digest is asserted when it was recorded and reported when it was not,
rather than being required. Size validation applies either way, since the
sidecar is written from the bytes actually read.
Copy file name to clipboardExpand all lines: biojava-integrationtest/src/test/java/org/biojava/nbio/structure/test/io/density/DensityMapIntegrationTest.java
+31-7Lines changed: 31 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,7 @@
25
25
26
26
importjava.io.File;
27
27
importjava.io.IOException;
28
+
importjava.nio.charset.StandardCharsets;
28
29
importjava.nio.file.Files;
29
30
importjava.util.Arrays;
30
31
importjava.util.List;
@@ -163,11 +164,22 @@ public void reportsWhyAnEntryHasNoDensity() throws IOException {
163
164
}
164
165
165
166
/**
166
-
* The wwPDB servers return the content MD5 as the ETag, so a coefficient
167
-
* download is checksum-verified without a separate hash file.
167
+
* Coefficients must arrive intact and be verifiable afterwards. Whether that
168
+
* verification includes a cryptographic digest depends on the server.
169
+
* <p>
170
+
* The divided archive paths on files.wwpdb.org and files.rcsb.org return the content
171
+
* MD5 as the ETag. The flat /validation/download/ endpoint this provider now uses
172
+
* returns neither an ETag nor a Content-Length, and neither does the beta archive on
173
+
* those two hosts, so no digest can be recorded there. The size sidecar is written
174
+
* from the bytes actually read, so it exists either way.
175
+
* <p>
176
+
* The digest is therefore asserted when the server offered one and skipped when it
177
+
* did not, rather than being required: requiring it would fail against the endpoint
178
+
* we use, and hard-coding the divided path would only work until the archive
0 commit comments