fix: don't send just " " in body, send an empty string (#10561)

Co-authored-by: Mickael MAGNIEZ <mmagniez@veepee.com>
This commit is contained in:
Mickael Magniez 2021-10-09 09:45:30 +02:00 committed by GitHub
parent cd9bd969d7
commit ba55332f4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -172,7 +172,7 @@ class ApiInvoker(formats: Formats)(implicit system: ActorSystem) extends CustomC
case Some(c: String) =>
HttpRequest(m, uri, entity = HttpEntity(normalizedContentType(request.contentType), ByteString(c)))
case _ =>
HttpRequest(m, uri, entity = HttpEntity(normalizedContentType(request.contentType), ByteString(" ")))
HttpRequest(m, uri, entity = HttpEntity(normalizedContentType(request.contentType), ByteString("")))
}
case m: HttpMethod => HttpRequest(m, uri)
}

View File

@ -182,7 +182,7 @@ class ApiInvoker(formats: Formats)(implicit system: ActorSystem) extends CustomC
case Some(c: String) =>
HttpRequest(m, uri, entity = HttpEntity(normalizedContentType(request.contentType), ByteString(c)))
case _ =>
HttpRequest(m, uri, entity = HttpEntity(normalizedContentType(request.contentType), ByteString(" ")))
HttpRequest(m, uri, entity = HttpEntity(normalizedContentType(request.contentType), ByteString("")))
}
case m: HttpMethod => HttpRequest(m, uri)
}