Overview

Namespaces

  • Contrib
    • Bundle
      • CoverallsBundle
        • Console
        • Entity
      • CoverallsV1Bundle
        • Api
        • Collector
        • Command
        • Config
        • Entity
          • Git
    • Component
      • File
      • Log
      • System
        • Git
  • Guzzle
    • Batch
      • Exception
    • Cache
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
      • QueryAggregator
    • Inflection
    • Iterator
    • Log
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Async
      • Backoff
      • Cache
      • Cookie
        • CookieJar
        • Exception
      • CurlAuth
      • ErrorResponse
        • Exception
      • History
      • Log
      • Md5
      • Mock
      • Oauth
    • Service
      • Builder
      • Command
        • Factory
        • LocationVisitor
          • Request
          • Response
      • Description
      • Exception
      • Resource
    • Stream
  • PHP
  • Psr
    • Log
  • Symfony
    • Component
      • Config
        • Definition
          • Builder
          • Exception
        • Exception
        • Loader
        • Resource
        • Util
      • Console
        • Command
        • Formatter
        • Helper
        • Input
        • Output
        • Tester
      • EventDispatcher
        • Debug
      • Finder
        • Adapter
        • Comparator
        • Exception
        • Expression
        • Iterator
        • Shell
      • Stopwatch
      • Yaml
        • Exception

Classes

  • CommandContentMd5Plugin
  • Md5ValidatorPlugin
  • Overview
  • Namespace
  • Class
  • Tree
  • Todo

Class Md5ValidatorPlugin

Ensures that an the MD5 hash of an entity body matches the Content-MD5 header (if set) of an HTTP response. An exception is thrown if the calculated MD5 does not match the expected MD5.

Guzzle\Plugin\Md5\Md5ValidatorPlugin implements Symfony\Component\EventDispatcher\EventSubscriberInterface
Namespace: Guzzle\Plugin\Md5
Located at Guzzle/Plugin/Md5/Md5ValidatorPlugin.php
Methods summary
public
# __construct( boolean $contentEncoded = true, boolean|integer $contentLengthCutoff = false )

Constructor

Constructor

Parameters

$contentEncoded
boolean
$contentEncoded 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.
$contentLengthCutoff
boolean|integer
$contentLengthCutoff 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 too memory intensive.
public static array
# getSubscribedEvents( )

Returns an array of event names this subscriber wants to listen to.

Returns an array of event names this subscriber wants to listen to.

Returns

array
The event names to listen to

Implementation of

Symfony\Component\EventDispatcher\EventSubscriberInterface::getSubscribedEvents()
public
# onRequestComplete( Guzzle\Common\Event $event )

Throws

Guzzle\Common\Exception\UnexpectedValueException
Properties summary
protected integer $contentLengthCutoff
#

Maximum Content-Length in bytes to validate

Maximum Content-Length in bytes to validate

protected boolean $contentEncoded
#

Whether or not to compare when a Content-Encoding is present

Whether or not to compare when a Content-Encoding is present

php-coveralls API documentation generated by ApiGen 2.8.0