From 04e033131b34e5fcf9d081190276325a475f77a7 Mon Sep 17 00:00:00 2001 From: Michael Dowling Date: Fri, 8 Apr 2011 13:51:29 -0500 Subject: [PATCH] [Http] Making the calculation of an entity body MD5 hash default to true when using the Md5ValidatorPlugin. Fixing typo in docblock. --- src/Guzzle/Http/Plugin/Md5ValidatorPlugin.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Guzzle/Http/Plugin/Md5ValidatorPlugin.php b/src/Guzzle/Http/Plugin/Md5ValidatorPlugin.php index e3f42f59..30b73114 100644 --- a/src/Guzzle/Http/Plugin/Md5ValidatorPlugin.php +++ b/src/Guzzle/Http/Plugin/Md5ValidatorPlugin.php @@ -33,16 +33,17 @@ class Md5ValidatorPlugin implements Observer /** * Constructor * - * @param bool $calcContentEncoded (optional) Set to TRUE to validate the - * MD5 hash of an entity body that was received when Content-Encoding - * was applied. This is a more expensive comparison because the entity - * body will need to be compressed in order to get the correct hash. + * @param bool $calcContentEncoded (optional) Calculating the MD5 hash of an + * entity body where a Content-Encoding was applied is a more expensive + * comparison because the entity body will need to be compressed in + * order to get the correct hash. Set to FALSE to not validate + * the MD5 hash of an entity body with an applied Content-Encoding. * @param int $contentLengthCutoff (optional) Maximum Content-Length (bytes) * in which a MD5 hash will be validated. Any response with a * Content-Length greater than this value will not be validated - * because it will be deemed to memory intensive + * because it will be deemed too memory intensive */ - public function __construct($contentEncoded = false, $contentLengthCutoff = 2097152) + public function __construct($contentEncoded = true, $contentLengthCutoff = 2097152) { $this->contentLengthCutoff = $contentLengthCutoff; $this->contentEncoded = $contentEncoded;