github guzzle/psr7 1.4.0

latest releases: 2.6.2, 2.6.1, 2.6.0...
7 years ago
  • Fix Stream::read when length parameter <= 0.
  • copy_to_stream reads bytes in chunks instead of maxLen into memory.
  • Fix ServerRequest::getUriFromGlobals when Host header contains port.
  • Ensure ServerRequest::getUriFromGlobals returns a URI in absolute form.
  • Allow parse_response to parse a response without delimiting space and reason.
  • Ensure each URI modification results in a valid URI according to PSR-7 discussions.
    Invalid modifications will throw an exception instead of returning a wrong URI or
    doing some magic.
    • (new Uri)->withPath('foo')->withHost('example.com') will throw an exception
      because the path of a URI with an authority must start with a slash "/" or be empty
    • (new Uri())->withScheme('http') will return 'http://localhost'
  • Fix compatibility of URIs with file scheme and empty host.
  • Added common URI utility methods based on RFC 3986 (see documentation in the readme):
    • Uri::isDefaultPort
    • Uri::isAbsolute
    • Uri::isNetworkPathReference
    • Uri::isAbsolutePathReference
    • Uri::isRelativePathReference
    • Uri::isSameDocumentReference
    • Uri::composeComponents
    • UriNormalizer::normalize
    • UriNormalizer::isEquivalent
    • UriResolver::relativize
  • Deprecated Uri::resolve in favor of UriResolver::resolve
  • Deprecated Uri::removeDotSegments in favor of UriResolver::removeDotSegments

Don't miss a new psr7 release

NewReleases is sending notifications on new releases.