1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-02-13 03:45:22 +01:00

[Http] Making the calculation of an entity body MD5 hash default to true when using the Md5ValidatorPlugin. Fixing typo in docblock.

This commit is contained in:
Michael Dowling 2011-04-08 13:51:29 -05:00
parent e324a44675
commit 04e033131b

View File

@ -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;