private IHttpRequestBodyParser buildEmpty(TransferEncodingHttpHeader transferEncoding) {
return new EmptyHttpRequestBodyParser();
}
private IHttpRequestBodyParser buildFromContentType(ContentTypeHttpHeader contentType, TransferEncodingHttpHeader transferEncoding) {
IMediaType mediaType = contentType.getMediaType();
String mimeTypeString = mediaType.getType();
String loweredMimeTypeString = mimeTypeString.toLowerCase();
IHttpRequestBodyParser bodyParser = bodyParsers.get(loweredMimeTypeString);
if (bodyParser == null) {
LOGGER.warn("Unsupported media type. Trying application/octet-stream.", new HttpException(HttpStatusCode.STATUS_415_UNSUPPORTED_MEDIA_TYPE, "The media type '" + mimeTypeString + "' is not (yet) supported."));