Skip to content

Commit 04b75fa

Browse files
authored
[HYRAX-1868] Turn Checksums on all the time the NGAP service. (#242)
* Checksums on all the time for NGAP service.
1 parent 3f9f4da commit 04b75fa

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

src/opendap/ngap/NgapBesApi.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,16 @@ public Document getDap4RequestDocument(User user,
273273

274274
addEdlAuthToken(request,user);
275275

276-
if(qp.computeChecksums())
277-
request.addContent(setContextElement(DAP4_CHECKSUMS_CONTEXT,"true"));
278-
276+
// @FIXME - THIS IS WHERE WE WOULD INVOKE OPTIONAL CHECKSUMS, BUT WE ARE MAKING THEM MANDATORY TO
277+
// ACCOMMODATE BROKEN CLIENT CODE THAT EXPECTS THEM TO AWLAYS BE THERE. THIS WILL BREAK getdap4
278+
// AND ALL OF THE ASSOCIATED TESTS BECAUSE AT THE TIME THIS IS WRITTEN THERE IS NO WAY FOR A
279+
// FOR A CLIENT TO KNOW THAT A DAP4 DATA RESPONSE CONTAINS CHECKSUMS.
280+
//
281+
// if(qp.computeChecksums())
282+
if(type.equalsIgnoreCase(DAP4_DATA) ||
283+
(type.equalsIgnoreCase(DAP4_DMR) && qp.computeChecksums()) ) {
284+
request.addContent(setContextElement(DAP4_CHECKSUMS_CONTEXT, "true"));
285+
}
279286
request.addContent(setContainerElement(getBesContainerName(),
280287
getBesSpaceName(),remoteDataSourceUrl,type));
281288

0 commit comments

Comments
 (0)