Allow decoding of uncompressed payloads
@@ -51,7 +51,7 @@ namespace CommonSchema
}
ClientId = requestHeaders["Client-Id"];
ContentType = requestHeaders["Content-Type"];
- ContentEncoding = requestHeaders["Content-Encoding"];
+ ContentEncoding = requestHeaders.ContainsKey("Content-Encoding") ? requestHeaders["Content-Encoding"] : "";
RequestBody = requestBody ?? throw new ArgumentNullException(nameof(requestBody));
}
@@ -298,10 +298,6 @@ namespace CommonSchema
{
data = Inflate(data);
}
- else
- {
- throw new ArgumentException("Unknown Content-Encoding: " + this.ContentEncoding);
- }
}
// read using Common Schema protocol
