diff --git a/marklogic-client-api/src/main/java/com/marklogic/client/impl/OkHttpServices.java b/marklogic-client-api/src/main/java/com/marklogic/client/impl/OkHttpServices.java index 703e6fbe7..d2b2f93e8 100644 --- a/marklogic-client-api/src/main/java/com/marklogic/client/impl/OkHttpServices.java +++ b/marklogic-client-api/src/main/java/com/marklogic/client/impl/OkHttpServices.java @@ -4201,12 +4201,18 @@ private Request.Builder addTelemetryAgentId(Request.Builder requestBldr) { return requestBldr.header("ML-Agent-ID", "java"); } + /** + * Per https://docs.marklogic.com/10.0/guide/relnotes/chap3#id_73268 , support for ML-Check-ML11-Headers was added + * for MarkLogic 10.0-9. It is no longer needed in MarkLogic 11 or later. The addition of it will not cause any + * harm, but it can be removed once the Java client no longer needs to support MarkLogic 10. + * + * @param requestBldr + * @param path + * @return + */ private Request.Builder addTrailerHeadersIfNecessary(Request.Builder requestBldr, String path) { if ("rows".equals(path)) { - // Standard header supported by ML 11 requestBldr.addHeader("TE", "trailers"); - - // Proprietary header recognized by ML 10.0-9, per https://docs.marklogic.com/guide/relnotes/chap3#id_73268 requestBldr.addHeader("ML-Check-ML11-Headers", "true"); } return requestBldr;