Skip to content

Commit e05f32f

Browse files
authored
Merge pull request #1584 from marklogic/feature/headers-comment
Added comment about ML-Check-ML11-Headers
2 parents c573f0c + 2a6010e commit e05f32f

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

marklogic-client-api/src/main/java/com/marklogic/client/impl/OkHttpServices.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4201,12 +4201,18 @@ private Request.Builder addTelemetryAgentId(Request.Builder requestBldr) {
42014201
return requestBldr.header("ML-Agent-ID", "java");
42024202
}
42034203

4204+
/**
4205+
* Per https://docs.marklogic.com/10.0/guide/relnotes/chap3#id_73268 , support for ML-Check-ML11-Headers was added
4206+
* for MarkLogic 10.0-9. It is no longer needed in MarkLogic 11 or later. The addition of it will not cause any
4207+
* harm, but it can be removed once the Java client no longer needs to support MarkLogic 10.
4208+
*
4209+
* @param requestBldr
4210+
* @param path
4211+
* @return
4212+
*/
42044213
private Request.Builder addTrailerHeadersIfNecessary(Request.Builder requestBldr, String path) {
42054214
if ("rows".equals(path)) {
4206-
// Standard header supported by ML 11
42074215
requestBldr.addHeader("TE", "trailers");
4208-
4209-
// Proprietary header recognized by ML 10.0-9, per https://docs.marklogic.com/guide/relnotes/chap3#id_73268
42104216
requestBldr.addHeader("ML-Check-ML11-Headers", "true");
42114217
}
42124218
return requestBldr;

0 commit comments

Comments
 (0)