1# Change Log 2 3 4All notable changes to this project will be documented in this file. 5 6The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) 7and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). 8 9 10## [Unreleased] 11 12## [1.7.0] - 2020-09-30 13 14### Added 15 16- Replaced functions by static methods 17 18### Fixed 19 20- Converting a non-seekable stream to a string 21- Handle multiple Set-Cookie correctly 22- Ignore array keys in header values when merging 23- Allow multibyte characters to be parsed in `Message:bodySummary()` 24 25### Changed 26 27- Restored partial HHVM 3 support 28 29 30## [1.6.1] - 2019-07-02 31 32### Fixed 33 34- Accept null and bool header values again 35 36 37## [1.6.0] - 2019-06-30 38 39### Added 40 41- Allowed version `^3.0` of `ralouphie/getallheaders` dependency (#244) 42- Added MIME type for WEBP image format (#246) 43- Added more validation of values according to PSR-7 and RFC standards, e.g. status code range (#250, #272) 44 45### Changed 46 47- Tests don't pass with HHVM 4.0, so HHVM support got dropped. Other libraries like composer have done the same. (#262) 48- Accept port number 0 to be valid (#270) 49 50### Fixed 51 52- Fixed subsequent reads from `php://input` in ServerRequest (#247) 53- Fixed readable/writable detection for certain stream modes (#248) 54- Fixed encoding of special characters in the `userInfo` component of an URI (#253) 55 56 57## [1.5.2] - 2018-12-04 58 59### Fixed 60 61- Check body size when getting the message summary 62 63 64## [1.5.1] - 2018-12-04 65 66### Fixed 67 68- Get the summary of a body only if it is readable 69 70 71## [1.5.0] - 2018-12-03 72 73### Added 74 75- Response first-line to response string exception (fixes #145) 76- A test for #129 behavior 77- `get_message_body_summary` function in order to get the message summary 78- `3gp` and `mkv` mime types 79 80### Changed 81 82- Clarify exception message when stream is detached 83 84### Deprecated 85 86- Deprecated parsing folded header lines as per RFC 7230 87 88### Fixed 89 90- Fix `AppendStream::detach` to not close streams 91- `InflateStream` preserves `isSeekable` attribute of the underlying stream 92- `ServerRequest::getUriFromGlobals` to support URLs in query parameters 93 94 95Several other fixes and improvements. 96 97 98## [1.4.2] - 2017-03-20 99 100### Fixed 101 102- Reverted BC break to `Uri::resolve` and `Uri::removeDotSegments` by removing 103 calls to `trigger_error` when deprecated methods are invoked. 104 105 106## [1.4.1] - 2017-02-27 107 108### Added 109 110- Rriggering of silenced deprecation warnings. 111 112### Fixed 113 114- Reverted BC break by reintroducing behavior to automagically fix a URI with a 115 relative path and an authority by adding a leading slash to the path. It's only 116 deprecated now. 117 118 119## [1.4.0] - 2017-02-21 120 121### Added 122 123- Added common URI utility methods based on RFC 3986 (see documentation in the readme): 124 - `Uri::isDefaultPort` 125 - `Uri::isAbsolute` 126 - `Uri::isNetworkPathReference` 127 - `Uri::isAbsolutePathReference` 128 - `Uri::isRelativePathReference` 129 - `Uri::isSameDocumentReference` 130 - `Uri::composeComponents` 131 - `UriNormalizer::normalize` 132 - `UriNormalizer::isEquivalent` 133 - `UriResolver::relativize` 134 135### Changed 136 137- Ensure `ServerRequest::getUriFromGlobals` returns a URI in absolute form. 138- Allow `parse_response` to parse a response without delimiting space and reason. 139- Ensure each URI modification results in a valid URI according to PSR-7 discussions. 140 Invalid modifications will throw an exception instead of returning a wrong URI or 141 doing some magic. 142 - `(new Uri)->withPath('foo')->withHost('example.com')` will throw an exception 143 because the path of a URI with an authority must start with a slash "/" or be empty 144 - `(new Uri())->withScheme('http')` will return `'http://localhost'` 145 146### Deprecated 147 148- `Uri::resolve` in favor of `UriResolver::resolve` 149- `Uri::removeDotSegments` in favor of `UriResolver::removeDotSegments` 150 151### Fixed 152 153- `Stream::read` when length parameter <= 0. 154- `copy_to_stream` reads bytes in chunks instead of `maxLen` into memory. 155- `ServerRequest::getUriFromGlobals` when `Host` header contains port. 156- Compatibility of URIs with `file` scheme and empty host. 157 158 159## [1.3.1] - 2016-06-25 160 161### Fixed 162 163- `Uri::__toString` for network path references, e.g. `//example.org`. 164- Missing lowercase normalization for host. 165- Handling of URI components in case they are `'0'` in a lot of places, 166 e.g. as a user info password. 167- `Uri::withAddedHeader` to correctly merge headers with different case. 168- Trimming of header values in `Uri::withAddedHeader`. Header values may 169 be surrounded by whitespace which should be ignored according to RFC 7230 170 Section 3.2.4. This does not apply to header names. 171- `Uri::withAddedHeader` with an array of header values. 172- `Uri::resolve` when base path has no slash and handling of fragment. 173- Handling of encoding in `Uri::with(out)QueryValue` so one can pass the 174 key/value both in encoded as well as decoded form to those methods. This is 175 consistent with withPath, withQuery etc. 176- `ServerRequest::withoutAttribute` when attribute value is null. 177 178 179## [1.3.0] - 2016-04-13 180 181### Added 182 183- Remaining interfaces needed for full PSR7 compatibility 184 (ServerRequestInterface, UploadedFileInterface, etc.). 185- Support for stream_for from scalars. 186 187### Changed 188 189- Can now extend Uri. 190 191### Fixed 192- A bug in validating request methods by making it more permissive. 193 194 195## [1.2.3] - 2016-02-18 196 197### Fixed 198 199- Support in `GuzzleHttp\Psr7\CachingStream` for seeking forward on remote 200 streams, which can sometimes return fewer bytes than requested with `fread`. 201- Handling of gzipped responses with FNAME headers. 202 203 204## [1.2.2] - 2016-01-22 205 206### Added 207 208- Support for URIs without any authority. 209- Support for HTTP 451 'Unavailable For Legal Reasons.' 210- Support for using '0' as a filename. 211- Support for including non-standard ports in Host headers. 212 213 214## [1.2.1] - 2015-11-02 215 216### Changes 217 218- Now supporting negative offsets when seeking to SEEK_END. 219 220 221## [1.2.0] - 2015-08-15 222 223### Changed 224 225- Body as `"0"` is now properly added to a response. 226- Now allowing forward seeking in CachingStream. 227- Now properly parsing HTTP requests that contain proxy targets in 228 `parse_request`. 229- functions.php is now conditionally required. 230- user-info is no longer dropped when resolving URIs. 231 232 233## [1.1.0] - 2015-06-24 234 235### Changed 236 237- URIs can now be relative. 238- `multipart/form-data` headers are now overridden case-insensitively. 239- URI paths no longer encode the following characters because they are allowed 240 in URIs: "(", ")", "*", "!", "'" 241- A port is no longer added to a URI when the scheme is missing and no port is 242 present. 243 244 245## 1.0.0 - 2015-05-19 246 247Initial release. 248 249Currently unsupported: 250 251- `Psr\Http\Message\ServerRequestInterface` 252- `Psr\Http\Message\UploadedFileInterface` 253 254 255 256[Unreleased]: https://github.com/guzzle/psr7/compare/1.6.0...HEAD 257[1.6.0]: https://github.com/guzzle/psr7/compare/1.5.2...1.6.0 258[1.5.2]: https://github.com/guzzle/psr7/compare/1.5.1...1.5.2 259[1.5.1]: https://github.com/guzzle/psr7/compare/1.5.0...1.5.1 260[1.5.0]: https://github.com/guzzle/psr7/compare/1.4.2...1.5.0 261[1.4.2]: https://github.com/guzzle/psr7/compare/1.4.1...1.4.2 262[1.4.1]: https://github.com/guzzle/psr7/compare/1.4.0...1.4.1 263[1.4.0]: https://github.com/guzzle/psr7/compare/1.3.1...1.4.0 264[1.3.1]: https://github.com/guzzle/psr7/compare/1.3.0...1.3.1 265[1.3.0]: https://github.com/guzzle/psr7/compare/1.2.3...1.3.0 266[1.2.3]: https://github.com/guzzle/psr7/compare/1.2.2...1.2.3 267[1.2.2]: https://github.com/guzzle/psr7/compare/1.2.1...1.2.2 268[1.2.1]: https://github.com/guzzle/psr7/compare/1.2.0...1.2.1 269[1.2.0]: https://github.com/guzzle/psr7/compare/1.1.0...1.2.0 270[1.1.0]: https://github.com/guzzle/psr7/compare/1.0.0...1.1.0 271