diff --git a/core/model/src/main/kotlin/au/com/dius/pact/core/model/OptionalBody.kt b/core/model/src/main/kotlin/au/com/dius/pact/core/model/OptionalBody.kt index 9d094ac420..c8fe40519a 100644 --- a/core/model/src/main/kotlin/au/com/dius/pact/core/model/OptionalBody.kt +++ b/core/model/src/main/kotlin/au/com/dius/pact/core/model/OptionalBody.kt @@ -20,9 +20,7 @@ data class OptionalBody( init { if (contentType == ContentType.UNKNOWN) { - logger.debug { "Body content type is unknown, will try detect body contents" } val detectedContentType = detectContentType() - logger.debug { "Detected content type = $detectedContentType" } if (detectedContentType != null) { this.contentType = detectedContentType } @@ -114,9 +112,7 @@ data class OptionalBody( this.isPresent() -> { val metadata = Metadata() val mimetype = tika.detector.detect(TikaInputStream.get(value!!), metadata) - logger.debug { "Tika returned $mimetype" } if (mimetype.baseType.type == "text") { - logger.debug { "Base type is text, will try match the contents" } detectStandardTextContentType() ?: ContentType(mimetype) } else { ContentType(mimetype) diff --git a/core/model/src/test/groovy/au/com/dius/pact/core/model/OptionalBodySpec.groovy b/core/model/src/test/groovy/au/com/dius/pact/core/model/OptionalBodySpec.groovy index a655a7fdcd..728fed1176 100644 --- a/core/model/src/test/groovy/au/com/dius/pact/core/model/OptionalBodySpec.groovy +++ b/core/model/src/test/groovy/au/com/dius/pact/core/model/OptionalBodySpec.groovy @@ -147,7 +147,7 @@ class OptionalBodySpec extends Specification { OptionalBody.missing() | 'null' OptionalBody.body(''.bytes, ContentType.UNKNOWN) | 'null' OptionalBody.body('{}'.bytes, ContentType.UNKNOWN) | 'application/json' - bodyFromFile('/v1-pact.json') | 'application/json' + bodyFromFile('/1070-ApiConsumer-ApiProvider.json') | 'application/json' bodyFromFile('/logback-test.xml') | 'application/xml' bodyFromFile('/RAT.JPG') | 'image/jpeg' }