Hi there, Thank you for this great software. Very...
# pact-jvm
f
Hi there, Thank you for this great software. Very useful. I want to know if this is by design in PACT-JVM… or a BUG • You are running a PROVIDER Contract Test that gets the contract to validate from PactBroker • The PACT framework parses contract coming from defined PactBroker • This particular contract has this header
Content-Type: multipart/related; type=\"application/json\"; boundary=myBoundary
• When parsing contracts quotes disappear on PACT Request Model • But when it serializes the Request Model this is the generated header
Content-Type: multipart/related; type=application/json; boundary=myBoundary
👋 1
The involved code is:
Copy code
au.com.dius.pact.core.model.HeaderParser
Copy code
private fun hvToString(headerValue: HeaderValue): String {
  return if (headerValue.params.isEmpty()) {
    headerValue.value.trim()
  } else {
    headerValue.value.trim() + ";" + headerValue.params.joinToString(";") { it.name + "=" + it.value }
  }
}
This serialization code it isn´t dealing with quotes
u
Can you raise an issue for this?
f
Hi @uglyog. Sure, I did it yesterday https://github.com/pact-foundation/pact-jvm/issues/1538
From this document I guess quoting has different rules for each header. So rebuilding them after parsing removal can be tricky