'Karate API - How to configure client cookie decoder to LAX (relax)?

One of our services is responding with an encryted cookie key name, the key name has symbols that are not able to be parsed using the Netty's strict decoder.

How we can configure this test to skip the Strict decoding and process the cookie as is in Karate API version 1.1.0 or 1.0.1?


com.intuit.karate.http.Response.java:

while(var3.hasNext()) {
  String value = (String)var3.next();
  Cookie cookie = ClientCookieDecoder.STRICT.decode(value);  //<<<<---- value = cookie with symbols, returns null
  map.put(cookie.name(), Cookies.toMap(cookie));  //<<<---- null exeption
}

10:13:31,606 DEBUG karate.io.netty.handler.codec.http.cookie.ClientCookieDecoder:74 - Skipping cookie because value 'tKBWtkk' contains invalid char '' 10:13:31,606 ERROR com.intuit.karate:122 - When method post java.lang.NullPointerException



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source