{"record":{"id":"17c61dd496ab74f8","repo":"karatelabs/karate","slug":"configure-lowercaseresponseheaders-is-deprecated-match","errorCode":null,"errorMessage":"configure 'lowerCaseResponseHeaders' is deprecated; 'match header X' is already case-insensitive and 'karate.lowerCase(responseHeaders)' covers direct map access","messagePattern":"configure 'lowerCaseResponseHeaders' is deprecated; 'match header X' is already case-insensitive and 'karate\\.lowerCase\\(responseHeaders\\)' covers direct map access","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"karate-core/src/main/java/io/karatelabs/core/KarateConfig.java","lineNumber":446,"sourceCode":"                this.onStepFailure = value;\n            }\n\n            // Driver configuration\n            case \"driver\" -> {\n                this.driverConfig = value;\n            }\n\n            // Deprecated v1 options - no-op with one-line migration hint\n            case \"logPrettyRequest\", \"logPrettyResponse\" -> {\n                logger.warn(\"configure '{}' is deprecated; use 'configure logging = {{ pretty: true|false }}'\", key);\n            }\n            case \"printEnabled\" -> {\n                logger.warn(\"configure 'printEnabled' is deprecated; print/karate.log go to the 'karate.scenario' \"\n                        + \"SLF4J category - set its level to WARN in logback.xml to keep them off the console, \"\n                        + \"or 'configure logging = {{ console: \\\"warn\\\" }}' to quiet all karate console output\");\n            }\n            case \"lowerCaseResponseHeaders\" -> {\n                logger.warn(\"configure 'lowerCaseResponseHeaders' is deprecated; \"\n                        + \"'match header X' is already case-insensitive and 'karate.lowerCase(responseHeaders)' \"\n                        + \"covers direct map access\");\n            }\n            case \"logModifier\" -> {\n                logger.warn(\"configure 'logModifier' is removed; \"\n                        + \"use the declarative form: 'configure logging = {{ mask: {{ headers: [...], jsonPaths: [...], patterns: [...] }} }}'\");\n            }\n\n            // No channel-type cases: channels (grpc, kafka, …) are configured via their rich\n            // JS object — karate.channel('kafka') / the boot.ext('kafka') object — not via global\n            // 'configure <type>'. 'configure' stays strict so key typos fail loudly.\n            default -> throw new RuntimeException(\"unexpected 'configure' key: '\" + key + \"'\");\n        }\n    }\n\n    private void configureSsl(Object value) {\n        if (value == null) {\n            this.ssl.clear();","sourceCodeStart":428,"sourceCodeEnd":464,"githubUrl":"https://github.com/karatelabs/karate/blob/a22eb90246d958d15a47bf436693d0121ad2812d/karate-core/src/main/java/io/karatelabs/core/KarateConfig.java#L428-L464","documentation":"Karate v2 removed the `configure lowerCaseResponseHeaders` option. Header matching is already case-insensitive and `karate.lowerCase(responseHeaders)` covers direct map access, so the option is a no-op that logs this deprecation warning explaining the built-in replacements.","triggerScenarios":"A feature or JS config containing `configure lowerCaseResponseHeaders = true`, typically copied from a Karate v1 project that needed lowercased response header maps.","commonSituations":"v1→v2 migration of karate-config.js; tests asserting exact header map keys that relied on the old lowercasing; copied snippets from older codebases.","solutions":["Delete `configure lowerCaseResponseHeaders` from the feature/config (no replacement needed for match header)","If direct map access needs lowercase keys, wrap with karate.lowerCase(responseHeaders)","Update assertions that depended on lowercase keys to use case-insensitive match or karate.lowerCase","Grep for lowerCaseResponseHeaders across karate-config.js and *.feature and remove all occurrences"],"exampleFix":"// before\n* configure lowerCaseResponseHeaders = true\n* def h = responseHeaders\n// after\n* def h = karate.lowerCase(responseHeaders)","handlingStrategy":"validation","validationCode":"grep -rn 'lowerCaseResponseHeaders' karate-config.js features/ && echo 'deprecated configure key found'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Rely on case-insensitive `match header` instead of lowercasing maps","Use karate.lowerCase(responseHeaders) only where direct map access needs lowercase keys","Write header assertions that don't depend on key casing","Sweep configs for removed v1 keys as part of upgrade checklists"],"tags":["deprecation","configuration","migration","http-headers"],"backgroundTag":"deprecated-api-usage","analyzedSha":"a22eb90246d958d15a47bf436693d0121ad2812d","analyzedAt":"2026-09-12T09:01:00.220Z","contentChangedAt":"2026-09-12T09:01:00.220Z","schemaVersion":2},"datasetVersion":"2026-09-16T19:17:19.609Z"}